cloudstack/thirdparty/ehcache/docs/net/sf/ehcache/jcache/JCache.html

1456 lines
67 KiB
HTML
Executable File

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_13) on Sun Jul 13 13:05:42 EST 2008 -->
<TITLE>
JCache (ehcache)
</TITLE>
<META NAME="keywords" CONTENT="net.sf.ehcache.jcache.JCache class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="JCache (ehcache)";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/JCache.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<a href="/" target="_top">ehcache</a></EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../net/sf/ehcache/jcache/JCacheEntry.html" title="class in net.sf.ehcache.jcache"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?net/sf/ehcache/jcache/JCache.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="JCache.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
net.sf.ehcache.jcache</FONT>
<BR>
Class JCache</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>net.sf.ehcache.jcache.JCache</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD>java.util.Map, net.sf.jsr107cache.Cache</DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>JCache</B><DT>extends java.lang.Object<DT>implements net.sf.jsr107cache.Cache</DL>
</PRE>
<P>
Warning: This class is related to the JSR107 specification, which is in draft. It is subject to change without notice.
<p/>
A cache implementation that matches the draft JCACHE specification.
<p/>
WARNING: The JCache specfication is in draft and this API will change up until the time that JCACHE is finalised.
<p/>
It is not possible for one class to implement both JCACHE and Ehcache
in the same class due to conflicts with method signatures on get and remove.
<p/>
This implementation is an adaptor to Ehcache, and will exhibit the same underlying characteristics as Ehcache. Additiona features
have been added to Ehcache to match the JCache features. All of these features can be configured in ehcache.xml.
<p/>
The current JCache CacheManager class, available in the draft, is considered unworkable. Instead, use the Ehcache <code>cacheManager.getJCache(String name)</code>
to get a JCache. The JCache CacheManager is unlikely to make it into the final spec.
<p/>
The recommended creational pattern for JCache is one of:
<ol>
<li>Add a cache to ehcache.xml and use <code>cacheManager.getJCache(String name)</code> to access it.
<li>Create a JCache from an Ehcache, using one of the constructors in this class. Two types of CacheLoader can be specified, in which
case the underlying Ehcache loader is replaced by the one specified.
<li>Create an Ehcache from a Cache using its constructor, then a JCache, and then add it to the ehcache CacheManager using <code>cacheManager.addCache(JCache jCache)</code>
</ol>
<P>
<P>
<DL>
<DT><B>Since:</B></DT>
<DD>1.3</DD>
<DT><B>Version:</B></DT>
<DD>$Id: JCache.java 533 2007-08-11 04:15:34Z gregluck $</DD>
<DT><B>Author:</B></DT>
<DD>Greg Luck</DD>
</DL>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<A NAME="nested_class_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Nested Class Summary</B></FONT></TH>
</TR>
</TABLE>
&nbsp;<A NAME="nested_classes_inherited_from_class_java.util.Map"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Nested classes/interfaces inherited from interface java.util.Map</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>java.util.Map.Entry&lt;K,V&gt;</CODE></TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#JCache(net.sf.ehcache.Ehcache)">JCache</A></B>(<A HREF="../../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache">Ehcache</A>&nbsp;cache)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A constructor for JCache.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#JCache(net.sf.ehcache.Ehcache, net.sf.jsr107cache.CacheLoader)">JCache</A></B>(<A HREF="../../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache">Ehcache</A>&nbsp;cache,
net.sf.jsr107cache.CacheLoader&nbsp;cacheLoader)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A constructor for JCache.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#JCache(net.sf.ehcache.Ehcache, net.sf.ehcache.loader.CacheLoader)">JCache</A></B>(<A HREF="../../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache">Ehcache</A>&nbsp;cache,
<A HREF="../../../../net/sf/ehcache/loader/CacheLoader.html" title="interface in net.sf.ehcache.loader">CacheLoader</A>&nbsp;cacheLoader)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A constructor for JCache.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#addListener(net.sf.jsr107cache.CacheListener)">addListener</A></B>(net.sf.jsr107cache.CacheListener&nbsp;cacheListener)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add a listener to the list of cache listeners.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#clear()">clear</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes all mappings from this map (optional operation).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#containsKey(java.lang.Object)">containsKey</A></B>(java.lang.Object&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <tt>true</tt> if this map contains a mapping for the specified
key.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#containsValue(java.lang.Object)">containsValue</A></B>(java.lang.Object&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <tt>true</tt> if this map maps one or more keys to the
specified value.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Set</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#entrySet()">entrySet</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a set view of the mappings contained in this map.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#evict()">evict</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The evict method will remove objects from the cache that are no longer valid.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#get(java.lang.Object)">get</A></B>(java.lang.Object&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The get method will return, from the cache, the object associated with
the argument "key".</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#get(java.lang.Object, net.sf.ehcache.loader.CacheLoader)">get</A></B>(java.lang.Object&nbsp;key,
<A HREF="../../../../net/sf/ehcache/loader/CacheLoader.html" title="interface in net.sf.ehcache.loader">CacheLoader</A>&nbsp;loader)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The get method will return, from the cache, the object associated with
the argument "key".</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#get(java.lang.Object, net.sf.ehcache.loader.CacheLoader, java.lang.Object)">get</A></B>(java.lang.Object&nbsp;key,
<A HREF="../../../../net/sf/ehcache/loader/CacheLoader.html" title="interface in net.sf.ehcache.loader">CacheLoader</A>&nbsp;loader,
java.lang.Object&nbsp;loaderArgument)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The get method will return, from the cache, the object associated with
the argument "key".</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#get(java.lang.Object, java.lang.Object)">get</A></B>(java.lang.Object&nbsp;key,
java.lang.Object&nbsp;loaderArgument)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Same as <A HREF="../../../../net/sf/ehcache/jcache/JCache.html#get(java.lang.Object)"><CODE>get(Object)</CODE></A> except a CacheLoader argument is provided.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Map</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#getAll(java.util.Collection)">getAll</A></B>(java.util.Collection&nbsp;keys)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The getAll method will return, from the cache, a Map of the objects associated with the Collection of keys in argument "keys".</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Map</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#getAll(java.util.Collection, java.lang.Object)">getAll</A></B>(java.util.Collection&nbsp;keys,
java.lang.Object&nbsp;loaderArgument)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The getAll method will return, from the cache, a Map of the objects associated with the Collection of keys in argument "keys".</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache">Ehcache</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#getBackingCache()">getBackingCache</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the backing Ehcache</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;net.sf.jsr107cache.CacheEntry</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#getCacheEntry(java.lang.Object)">getCacheEntry</A></B>(java.lang.Object&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;returns the CacheEntry object associated with the key.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../net/sf/ehcache/loader/CacheLoader.html" title="interface in net.sf.ehcache.loader">CacheLoader</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#getCacheLoader()">getCacheLoader</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the CacheLoader registered in this cache</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;net.sf.jsr107cache.CacheStatistics</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#getCacheStatistics()">getCacheStatistics</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets an immutable Statistics object representing the Cache statistics at the time.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#isEmpty()">isEmpty</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <tt>true</tt> if this map contains no key-value mappings.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Set</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#keySet()">keySet</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a set view of the keys contained in this map.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#load(java.lang.Object)">load</A></B>(java.lang.Object&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The load method provides a means to "pre load" the cache.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#loadAll(java.util.Collection)">loadAll</A></B>(java.util.Collection&nbsp;keys)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The loadAll method provides a means to "pre load" objects into the cache.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#loadAll(java.util.Collection, java.lang.Object)">loadAll</A></B>(java.util.Collection&nbsp;keys,
java.lang.Object&nbsp;argument)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The loadAll method provides a means to "pre load" objects into the cache.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#peek(java.lang.Object)">peek</A></B>(java.lang.Object&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The peek method will return the object associated with "key" if it currently exists (and is valid) in the cache.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#put(java.lang.Object, java.lang.Object)">put</A></B>(java.lang.Object&nbsp;key,
java.lang.Object&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Associates the specified value with the specified key in this map
(optional operation).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#put(java.lang.Object, java.lang.Object, int)">put</A></B>(java.lang.Object&nbsp;key,
java.lang.Object&nbsp;value,
int&nbsp;timeToLiveSeconds)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Associates the specified value with the specified key in this map
(optional operation).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#putAll(java.util.Map)">putAll</A></B>(java.util.Map&nbsp;sourceMap)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Copies all of the mappings from the specified map to this map
(optional operation).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#remove(java.lang.Object)">remove</A></B>(java.lang.Object&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes the mapping for this key from this map if it is present
(optional operation).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#removeListener(net.sf.jsr107cache.CacheListener)">removeListener</A></B>(net.sf.jsr107cache.CacheListener&nbsp;cacheListener)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Remove a listener from the list of cache listeners</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#setCacheLoader(net.sf.ehcache.loader.CacheLoader)">setCacheLoader</A></B>(<A HREF="../../../../net/sf/ehcache/loader/CacheLoader.html" title="interface in net.sf.ehcache.loader">CacheLoader</A>&nbsp;cacheLoader)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Setter for the CacheLoader.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#setStatisticsAccuracy(int)">setStatisticsAccuracy</A></B>(int&nbsp;statisticsAccuracy)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the statistics accuracy.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#size()">size</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of key-value mappings in this map.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#toString()">toString</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a <CODE>String</CODE> representation of the underlying <A HREF="../../../../net/sf/ehcache/Cache.html" title="class in net.sf.ehcache"><CODE>Cache</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Collection</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#values()">values</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a collection view of the values contained in this map.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_net.sf.jsr107cache.Cache"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from interface net.sf.jsr107cache.Cache</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>equals, hashCode</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="JCache(net.sf.ehcache.Ehcache)"><!-- --></A><H3>
JCache</H3>
<PRE>
public <B>JCache</B>(<A HREF="../../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache">Ehcache</A>&nbsp;cache)</PRE>
<DL>
<DD>A constructor for JCache.
<p/>
JCache is an adaptor for an Ehcache, and therefore requires an Ehcache in its constructor.
<p/>
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>cache</CODE> - An ehcache<DT><B>Since:</B></DT>
<DD>1.4</DD>
<DT><B>See Also:</B><DD>"class description for recommended usage"</DL>
</DL>
<HR>
<A NAME="JCache(net.sf.ehcache.Ehcache, net.sf.jsr107cache.CacheLoader)"><!-- --></A><H3>
JCache</H3>
<PRE>
public <B>JCache</B>(<A HREF="../../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache">Ehcache</A>&nbsp;cache,
net.sf.jsr107cache.CacheLoader&nbsp;cacheLoader)</PRE>
<DL>
<DD>A constructor for JCache.
<p/>
JCache is an adaptor for an Ehcache, and therefore requires an Ehcache in its constructor.
<p/>
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>cache</CODE> - An ehcache<DD><CODE>cacheLoader</CODE> - used to load entries when they are not in the cache. If this is null, it is
set for the cache. If null, the JCache will inherit the CacheLoader set for the backing ehcache.
If specified, the underlying ehcache will have it's loader replaced.<DT><B>Since:</B></DT>
<DD>1.3</DD>
<DT><B>See Also:</B><DD>"class description for recommended usage"</DL>
</DL>
<HR>
<A NAME="JCache(net.sf.ehcache.Ehcache, net.sf.ehcache.loader.CacheLoader)"><!-- --></A><H3>
JCache</H3>
<PRE>
public <B>JCache</B>(<A HREF="../../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache">Ehcache</A>&nbsp;cache,
<A HREF="../../../../net/sf/ehcache/loader/CacheLoader.html" title="interface in net.sf.ehcache.loader">CacheLoader</A>&nbsp;cacheLoader)</PRE>
<DL>
<DD>A constructor for JCache.
<p/>
JCache is an adaptor for an Ehcache, and therefore requires an Ehcache in its constructor.
<p/>
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>cache</CODE> - An ehcache<DD><CODE>cacheLoader</CODE> - used to load entries when they are not in the cache. If this is null, it is
set for the cache. If null, the JCache will inherit the CacheLoader set for the backing ehcache.
If specified, the underlying ehcache will have it's loader replaced.<DT><B>Since:</B></DT>
<DD>1.3</DD>
<DT><B>See Also:</B><DD>"class description for recommended usage"</DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="setCacheLoader(net.sf.ehcache.loader.CacheLoader)"><!-- --></A><H3>
setCacheLoader</H3>
<PRE>
public void <B>setCacheLoader</B>(<A HREF="../../../../net/sf/ehcache/loader/CacheLoader.html" title="interface in net.sf.ehcache.loader">CacheLoader</A>&nbsp;cacheLoader)</PRE>
<DL>
<DD>Setter for the CacheLoader. Changing the CacheLoader takes immediate effect.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cacheLoader</CODE> - the loader to dynamically load new cache entries. This replaces the CacheLoader in the underlying ehcache.</DL>
</DD>
</DL>
<HR>
<A NAME="addListener(net.sf.jsr107cache.CacheListener)"><!-- --></A><H3>
addListener</H3>
<PRE>
public void <B>addListener</B>(net.sf.jsr107cache.CacheListener&nbsp;cacheListener)</PRE>
<DL>
<DD>Add a listener to the list of cache listeners. The behaviour of JCACHE and Ehcache listeners is a little
different. See <A HREF="../../../../net/sf/ehcache/jcache/JCacheListenerAdaptor.html" title="class in net.sf.ehcache.jcache"><CODE>JCacheListenerAdaptor</CODE></A> for details on how each event is adapted.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>addListener</CODE> in interface <CODE>net.sf.jsr107cache.Cache</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cacheListener</CODE> - a JCACHE CacheListener<DT><B>See Also:</B><DD><A HREF="../../../../net/sf/ehcache/jcache/JCacheListenerAdaptor.html" title="class in net.sf.ehcache.jcache"><CODE>JCacheListenerAdaptor</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="evict()"><!-- --></A><H3>
evict</H3>
<PRE>
public void <B>evict</B>()</PRE>
<DL>
<DD>The evict method will remove objects from the cache that are no longer valid.
Objects where the specified expiration time has been reached.
<p/>
This implementation synchronously checks each store for expired elements. Note that the DiskStore
has an expiryThread that runs periodically to do the same thing, and that the MemoryStore lazily checks
for expiry on overflow and peek, thus reducing the utility of calling this method.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>evict</CODE> in interface <CODE>net.sf.jsr107cache.Cache</CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getAll(java.util.Collection)"><!-- --></A><H3>
getAll</H3>
<PRE>
public java.util.Map <B>getAll</B>(java.util.Collection&nbsp;keys)
throws net.sf.jsr107cache.CacheException</PRE>
<DL>
<DD>The getAll method will return, from the cache, a Map of the objects associated with the Collection of keys in argument "keys".
If the objects are not in the cache, the associated cache loader will be called. If no loader is associated with an object,
a null is returned. If a problem is encountered during the retrieving or loading of the objects, an exception will be thrown.
If the "arg" argument is set, the arg object will be passed to the CacheLoader.loadAll method. The cache will not dereference
the object. If no "arg" value is provided a null will be passed to the loadAll method. The storing of null values in the cache
is permitted, however, the get method will not distinguish returning a null stored in the cache and not finding the object in
the cache. In both cases a null is returned.
<p/>
The Ehcache native API provides similar functionality to loaders using the
decorator <A HREF="../../../../net/sf/ehcache/constructs/blocking/SelfPopulatingCache.html" title="class in net.sf.ehcache.constructs.blocking"><CODE>SelfPopulatingCache</CODE></A>
<p/>
Note. If the getAll exceeds the maximum cache
size, the returned map will necessarily be less than the number specified.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>getAll</CODE> in interface <CODE>net.sf.jsr107cache.Cache</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>keys</CODE> -
<DT><B>Returns:</B><DD>a Map populated from the Cache. If there are no elements, an empty Map is returned.
<DT><B>Throws:</B>
<DD><CODE>net.sf.jsr107cache.CacheException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="getAll(java.util.Collection, java.lang.Object)"><!-- --></A><H3>
getAll</H3>
<PRE>
public java.util.Map <B>getAll</B>(java.util.Collection&nbsp;keys,
java.lang.Object&nbsp;loaderArgument)
throws net.sf.jsr107cache.CacheException</PRE>
<DL>
<DD>The getAll method will return, from the cache, a Map of the objects associated with the Collection of keys in argument "keys".
If the objects are not in the cache, the associated cache loader will be called. If no loader is associated with an object,
a null is returned. If a problem is encountered during the retrieving or loading of the objects, an exception will be thrown.
If the "arg" argument is set, the arg object will be passed to the CacheLoader.loadAll method. The cache will not dereference
the object. If no "arg" value is provided a null will be passed to the loadAll method. The storing of null values in the cache
is permitted, however, the get method will not distinguish returning a null stored in the cache and not finding the object in
the cache. In both cases a null is returned.
<p/>
The Ehcache native API provides similar functionality to loaders using the
decorator <A HREF="../../../../net/sf/ehcache/constructs/blocking/SelfPopulatingCache.html" title="class in net.sf.ehcache.constructs.blocking"><CODE>SelfPopulatingCache</CODE></A>
<p/>
Note. If the getAll exceeds the maximum cache
size, the returned map will necessarily be less than the number specified.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>keys</CODE> -
<DT><B>Returns:</B><DD>a Map populated from the Cache. If there are no elements, an empty Map is returned.
<DT><B>Throws:</B>
<DD><CODE>net.sf.jsr107cache.CacheException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="getCacheLoader()"><!-- --></A><H3>
getCacheLoader</H3>
<PRE>
public <A HREF="../../../../net/sf/ehcache/loader/CacheLoader.html" title="interface in net.sf.ehcache.loader">CacheLoader</A> <B>getCacheLoader</B>()</PRE>
<DL>
<DD>Gets the CacheLoader registered in this cache
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the loader, or null if there is none</DL>
</DD>
</DL>
<HR>
<A NAME="getCacheEntry(java.lang.Object)"><!-- --></A><H3>
getCacheEntry</H3>
<PRE>
public net.sf.jsr107cache.CacheEntry <B>getCacheEntry</B>(java.lang.Object&nbsp;key)</PRE>
<DL>
<DD>returns the CacheEntry object associated with the key.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>getCacheEntry</CODE> in interface <CODE>net.sf.jsr107cache.Cache</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key to look for in the cache</DL>
</DD>
</DL>
<HR>
<A NAME="getCacheStatistics()"><!-- --></A><H3>
getCacheStatistics</H3>
<PRE>
public net.sf.jsr107cache.CacheStatistics <B>getCacheStatistics</B>()
throws java.lang.IllegalStateException</PRE>
<DL>
<DD>Gets an immutable Statistics object representing the Cache statistics at the time. How the statistics are calculated
depends on the statistics accuracy setting. The only aspect of statistics sensitive to the accuracy setting is
object size. How that is calculated is discussed below.
<h3>Best Effort Size</h3>
This result is returned when the statistics accuracy setting is <CODE>CacheStatistics.STATISTICS_ACCURACY_BEST_EFFORT</CODE>.
<p/>
The size is the number of <A HREF="../../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache"><CODE>Element</CODE></A>s in the <A HREF="../../../../net/sf/ehcache/store/MemoryStore.html" title="class in net.sf.ehcache.store"><CODE>MemoryStore</CODE></A> plus
the number of <A HREF="../../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache"><CODE>Element</CODE></A>s in the <A HREF="../../../../net/sf/ehcache/store/DiskStore.html" title="class in net.sf.ehcache.store"><CODE>DiskStore</CODE></A>.
<p/>
This number is the actual number of elements, including expired elements that have
not been removed. Any duplicates between stores are accounted for.
<p/>
Expired elements are removed from the the memory store when
getting an expired element, or when attempting to spool an expired element to
disk.
<p/>
Expired elements are removed from the disk store when getting an expired element,
or when the expiry thread runs, which is once every five minutes.
<p/>
<h3>Guaranteed Accuracy Size</h3>
This result is returned when the statistics accuracy setting is <CODE>CacheStatistics.STATISTICS_ACCURACY_GUARANTEED</CODE>.
<p/>
This method accounts for elements which might be expired or duplicated between stores. It take approximately
200ms per 1000 elements to execute.
<h3>Fast but non-accurate Size</h3>
This result is returned when the statistics accuracy setting is <CODE>CacheStatistics.STATISTICS_ACCURACY_NONE</CODE>.
<p/>
The number given may contain expired elements. In addition if the DiskStore is used it may contain some double
counting of elements. It takes 6ms for 1000 elements to execute. Time to execute is O(log n). 50,000 elements take
36ms.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>getCacheStatistics</CODE> in interface <CODE>net.sf.jsr107cache.Cache</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the number of elements in the ehcache, with a varying degree of accuracy, depending on accuracy setting.
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalStateException</CODE> - if the cache is not <A HREF="../../../../net/sf/ehcache/Status.html#STATUS_ALIVE"><CODE>Status.STATUS_ALIVE</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="load(java.lang.Object)"><!-- --></A><H3>
load</H3>
<PRE>
public void <B>load</B>(java.lang.Object&nbsp;key)
throws net.sf.jsr107cache.CacheException</PRE>
<DL>
<DD>The load method provides a means to "pre load" the cache. This method will, asynchronously, load the specified
object into the cache using the associated cacheloader. If the object already exists in the cache, no action is
taken. If no loader is associated with the object, no object will be loaded into the cache. If a problem is
encountered during the retrieving or loading of the object, an exception should be logged. If the "arg" argument
is set, the arg object will be passed to the CacheLoader.load method. The cache will not dereference the object.
If no "arg" value is provided a null will be passed to the load method. The storing of null values in the cache
is permitted, however, the get method will not distinguish returning a null stored in the cache and not finding
the object in the cache. In both cases a null is returned.
<p/>
The Ehcache native API provides similar functionality to loaders using the
decorator <A HREF="../../../../net/sf/ehcache/constructs/blocking/SelfPopulatingCache.html" title="class in net.sf.ehcache.constructs.blocking"><CODE>SelfPopulatingCache</CODE></A>
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>load</CODE> in interface <CODE>net.sf.jsr107cache.Cache</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - key whose associated value to be loaded using the associated cacheloader if this cache doesn't contain it.
<DT><B>Throws:</B>
<DD><CODE>net.sf.jsr107cache.CacheException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="loadAll(java.util.Collection)"><!-- --></A><H3>
loadAll</H3>
<PRE>
public void <B>loadAll</B>(java.util.Collection&nbsp;keys)
throws net.sf.jsr107cache.CacheException</PRE>
<DL>
<DD>The loadAll method provides a means to "pre load" objects into the cache. This method will, asynchronously, load
the specified objects into the cache using the associated cache loader. If the an object already exists in the
cache, no action is taken. If no loader is associated with the object, no object will be loaded into the cache.
If a problem is encountered during the retrieving or loading of the objects, an exception (to be defined)
should be logged. The getAll method will return, from the cache, a Map of the objects associated with the
Collection of keys in argument "keys". If the objects are not in the cache, the associated cache loader will be
called. If no loader is associated with an object, a null is returned. If a problem is encountered during the
retrieving or loading of the objects, an exception (to be defined) will be thrown. If the "arg" argument is set,
the arg object will be passed to the CacheLoader.loadAll method. The cache will not dereference the object.
If no "arg" value is provided a null will be passed to the loadAll method.
<p/>
keys - collection of the keys whose associated values to be loaded into this cache by using the associated
cacheloader if this cache doesn't contain them.
<p/>
The Ehcache native API provides similar functionality to loaders using the
decorator <A HREF="../../../../net/sf/ehcache/constructs/blocking/SelfPopulatingCache.html" title="class in net.sf.ehcache.constructs.blocking"><CODE>SelfPopulatingCache</CODE></A>
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>loadAll</CODE> in interface <CODE>net.sf.jsr107cache.Cache</CODE></DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>net.sf.jsr107cache.CacheException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="loadAll(java.util.Collection, java.lang.Object)"><!-- --></A><H3>
loadAll</H3>
<PRE>
public void <B>loadAll</B>(java.util.Collection&nbsp;keys,
java.lang.Object&nbsp;argument)
throws net.sf.jsr107cache.CacheException</PRE>
<DL>
<DD>The loadAll method provides a means to "pre load" objects into the cache. This method will, asynchronously, load
the specified objects into the cache using the associated cache loader. If the an object already exists in the
cache, no action is taken. If no loader is associated with the object, no object will be loaded into the cache.
If a problem is encountered during the retrieving or loading of the objects, an exception (to be defined)
should be logged. The getAll method will return, from the cache, a Map of the objects associated with the
Collection of keys in argument "keys". If the objects are not in the cache, the associated cache loader will be
called. If no loader is associated with an object, a null is returned. If a problem is encountered during the
retrieving or loading of the objects, an exception (to be defined) will be thrown. If the "arg" argument is set,
the arg object will be passed to the CacheLoader.loadAll method. The cache will not dereference the object.
If no "arg" value is provided a null will be passed to the loadAll method.
<p/>
keys - collection of the keys whose associated values to be loaded into this cache by using the associated
cacheloader if this cache doesn't contain them.
<p/>
The Ehcache native API provides similar functionality to loaders using the
decorator <A HREF="../../../../net/sf/ehcache/constructs/blocking/SelfPopulatingCache.html" title="class in net.sf.ehcache.constructs.blocking"><CODE>SelfPopulatingCache</CODE></A>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>net.sf.jsr107cache.CacheException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="peek(java.lang.Object)"><!-- --></A><H3>
peek</H3>
<PRE>
public java.lang.Object <B>peek</B>(java.lang.Object&nbsp;key)</PRE>
<DL>
<DD>The peek method will return the object associated with "key" if it currently exists (and is valid) in the cache.
If not, a null is returned. With "peek" the CacheLoader will not be invoked and other caches in the system will not be searched.
<p/>
In ehcache peek bahaves the same way as <A HREF="../../../../net/sf/ehcache/jcache/JCache.html#get(java.lang.Object)"><CODE>get(java.lang.Object)</CODE></A>
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>peek</CODE> in interface <CODE>net.sf.jsr107cache.Cache</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> -
<DT><B>Returns:</B><DD>the value stored in the cache by key, or null if it does not exist</DL>
</DD>
</DL>
<HR>
<A NAME="removeListener(net.sf.jsr107cache.CacheListener)"><!-- --></A><H3>
removeListener</H3>
<PRE>
public void <B>removeListener</B>(net.sf.jsr107cache.CacheListener&nbsp;cacheListener)</PRE>
<DL>
<DD>Remove a listener from the list of cache listeners
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>removeListener</CODE> in interface <CODE>net.sf.jsr107cache.Cache</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cacheListener</CODE> - a JCACHE CacheListener<DT><B>See Also:</B><DD><A HREF="../../../../net/sf/ehcache/jcache/JCacheListenerAdaptor.html" title="class in net.sf.ehcache.jcache"><CODE>JCacheListenerAdaptor</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="size()"><!-- --></A><H3>
size</H3>
<PRE>
public int <B>size</B>()</PRE>
<DL>
<DD>Returns the number of key-value mappings in this map. If the
map contains more than <tt>Integer.MAX_VALUE</tt> elements, returns
<tt>Integer.MAX_VALUE</tt>.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>size</CODE> in interface <CODE>java.util.Map</CODE><DT><B>Specified by:</B><DD><CODE>size</CODE> in interface <CODE>net.sf.jsr107cache.Cache</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the number of key-value mappings in this map.</DL>
</DD>
</DL>
<HR>
<A NAME="isEmpty()"><!-- --></A><H3>
isEmpty</H3>
<PRE>
public boolean <B>isEmpty</B>()</PRE>
<DL>
<DD>Returns <tt>true</tt> if this map contains no key-value mappings.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>isEmpty</CODE> in interface <CODE>java.util.Map</CODE><DT><B>Specified by:</B><DD><CODE>isEmpty</CODE> in interface <CODE>net.sf.jsr107cache.Cache</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD><tt>true</tt> if this map contains no key-value mappings.</DL>
</DD>
</DL>
<HR>
<A NAME="containsKey(java.lang.Object)"><!-- --></A><H3>
containsKey</H3>
<PRE>
public boolean <B>containsKey</B>(java.lang.Object&nbsp;key)</PRE>
<DL>
<DD>Returns <tt>true</tt> if this map contains a mapping for the specified
key. More formally, returns <tt>true</tt> if and only if
this map contains a mapping for a key <tt>k</tt> such that
<tt>(key==null ? k==null : key.equals(k))</tt>. (There can be
at most one such mapping.)
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>containsKey</CODE> in interface <CODE>java.util.Map</CODE><DT><B>Specified by:</B><DD><CODE>containsKey</CODE> in interface <CODE>net.sf.jsr107cache.Cache</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - key whose presence in this map is to be tested.
<DT><B>Returns:</B><DD><tt>true</tt> if this map contains a mapping for the specified
key.</DL>
</DD>
</DL>
<HR>
<A NAME="containsValue(java.lang.Object)"><!-- --></A><H3>
containsValue</H3>
<PRE>
public boolean <B>containsValue</B>(java.lang.Object&nbsp;value)</PRE>
<DL>
<DD>Returns <tt>true</tt> if this map maps one or more keys to the
specified value. More formally, returns <tt>true</tt> if and only if
this map contains at least one mapping to a value <tt>v</tt> such that
<tt>(value==null ? v==null : value.equals(v))</tt>. This operation
will probably require time linear in the map size for most
implementations of the <tt>Map</tt> interface.
<p/>
Warning: This method is extremely slow. Ehcache is designed for efficient
retrieval using keys, not values.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>containsValue</CODE> in interface <CODE>java.util.Map</CODE><DT><B>Specified by:</B><DD><CODE>containsValue</CODE> in interface <CODE>net.sf.jsr107cache.Cache</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - value whose presence in this map is to be tested.
<DT><B>Returns:</B><DD><tt>true</tt> if this map maps one or more keys to the
specified value.</DL>
</DD>
</DL>
<HR>
<A NAME="get(java.lang.Object)"><!-- --></A><H3>
get</H3>
<PRE>
public java.lang.Object <B>get</B>(java.lang.Object&nbsp;key)
throws java.lang.RuntimeException</PRE>
<DL>
<DD>The get method will return, from the cache, the object associated with
the argument "key".
<p/>
If the object is not in the cache, the associated
cache loader will be called. If no loader is associated with the object,
a null is returned.
<p/>
If a problem is encountered during the retrieving
or loading of the object, an exception (to be defined) will be thrown. (Until it is
defined, the ehcache implementation throws a RuntimeException.)
<p/>
If the "arg" argument is set, the arg object will be passed to the
CacheLoader.load method. The cache will not dereference the object.
If no "arg" value is provided a null will be passed to the load method.
<p/>
The storing of null values in the cache is permitted, however, the get
method will not distinguish returning a null stored in the cache and
not finding the object in the cache. In both cases a null is returned.
<p/>
Cache statistics are only updated for the initial attempt to get the cached entry.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>get</CODE> in interface <CODE>java.util.Map</CODE><DT><B>Specified by:</B><DD><CODE>get</CODE> in interface <CODE>net.sf.jsr107cache.Cache</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - key whose associated value is to be returned.
<DT><B>Returns:</B><DD>the value to which this map maps the specified key, or
<tt>null</tt> if the map contains no mapping for this key after an attempt has been
made to load it.
<DT><B>Throws:</B>
<DD><CODE>java.lang.RuntimeException</CODE> - JSR107 should really throw a CacheException here, but the
spec does not allow it. Instead throw a RuntimeException if the underlying load method
throws a CacheException.<DT><B>See Also:</B><DD><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#containsKey(java.lang.Object)"><CODE>containsKey(Object)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="get(java.lang.Object, java.lang.Object)"><!-- --></A><H3>
get</H3>
<PRE>
public java.lang.Object <B>get</B>(java.lang.Object&nbsp;key,
java.lang.Object&nbsp;loaderArgument)
throws java.lang.RuntimeException</PRE>
<DL>
<DD>Same as <A HREF="../../../../net/sf/ehcache/jcache/JCache.html#get(java.lang.Object)"><CODE>get(Object)</CODE></A> except a CacheLoader argument is provided.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - key whose associated value is to be returned.<DD><CODE>loaderArgument</CODE> - anything at all that a CacheLoader might find useful to load
the entry. If the loaderArgument is null, this method is the same as <A HREF="../../../../net/sf/ehcache/jcache/JCache.html#get(java.lang.Object)"><CODE>get(Object)</CODE></A>
<DT><B>Returns:</B><DD>the value to which this map maps the specified key, or
<tt>null</tt> if the map contains no mapping for this key after an attempt has been
made to load it.
<DT><B>Throws:</B>
<DD><CODE>java.lang.RuntimeException</CODE> - JSR107 should really throw a CacheException here, but the
spec does not allow it. Instead throw a RuntimeException if the underlying load method
throws a CacheException.</DL>
</DD>
</DL>
<HR>
<A NAME="get(java.lang.Object, net.sf.ehcache.loader.CacheLoader)"><!-- --></A><H3>
get</H3>
<PRE>
public java.lang.Object <B>get</B>(java.lang.Object&nbsp;key,
<A HREF="../../../../net/sf/ehcache/loader/CacheLoader.html" title="interface in net.sf.ehcache.loader">CacheLoader</A>&nbsp;loader)
throws java.lang.RuntimeException</PRE>
<DL>
<DD>The get method will return, from the cache, the object associated with
the argument "key".
<p/>
If the object is not in the cache, the associated
cache loader will be called. If no loader is associated with the object,
a null is returned.
<p/>
If a problem is encountered during the retrieving
or loading of the object, an exception (to be defined) will be thrown. (Until it is
defined, the ehcache implementation throws a RuntimeException.)
<p/>
If the "argument" argument is set, the arg object will be passed to the
CacheLoader.load method. The cache will not dereference the object.
If no "argument" value is provided a null will be passed to the load method.
<p/>
The storing of null values in the cache is permitted, however, the get
method will not distinguish returning a null stored in the cache and
not finding the object in the cache. In both cases a null is returned.
<p/>
Cache statistics are only updated for the initial attempt to get the cached entry.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - key whose associated value is to be returned.<DD><CODE>loader</CODE> - A specific CacheLoader to use in place of the default one.
<DT><B>Returns:</B><DD>the value to which this map maps the specified key, or
<tt>null</tt> if the map contains no mapping for this key after an attempt has been
made to load it.
<DT><B>Throws:</B>
<DD><CODE>java.lang.RuntimeException</CODE> - JSR107 should really throw a CacheException here, but the
spec does not allow it. Instead throw a RuntimeException if the underlying load method
throws a CacheException.<DT><B>See Also:</B><DD><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#containsKey(java.lang.Object)"><CODE>containsKey(Object)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="get(java.lang.Object, net.sf.ehcache.loader.CacheLoader, java.lang.Object)"><!-- --></A><H3>
get</H3>
<PRE>
public java.lang.Object <B>get</B>(java.lang.Object&nbsp;key,
<A HREF="../../../../net/sf/ehcache/loader/CacheLoader.html" title="interface in net.sf.ehcache.loader">CacheLoader</A>&nbsp;loader,
java.lang.Object&nbsp;loaderArgument)
throws java.lang.RuntimeException</PRE>
<DL>
<DD>The get method will return, from the cache, the object associated with
the argument "key".
<p/>
If the object is not in the cache, the associated
cache loader will be called. If no loader is associated with the object,
a null is returned.
<p/>
If a problem is encountered during the retrieving
or loading of the object, an exception (to be defined) will be thrown. (Until it is
defined, the ehcache implementation throws a RuntimeException.)
<p/>
If the "loaderArgument" argument is set, it will be passed to the
CacheLoader.load method. The cache will not dereference the object.
If no "loaderArgument" value is provided a null will be passed to the load method.
<p/>
The storing of null values in the cache is permitted, however, the get
method will not distinguish returning a null stored in the cache and
not finding the object in the cache. In both cases a null is returned.
<p/>
Cache statistics are only updated for the initial attempt to get the cached entry.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - key whose associated value is to be returned.<DD><CODE>loader</CODE> - A specific CacheLoader to use in place of the default one.<DD><CODE>loaderArgument</CODE> - an Object with acts as a loaderArgument. It can contain anything that makes sense to the loader.
<DT><B>Returns:</B><DD>the value to which this map maps the specified key, or
<tt>null</tt> if the map contains no mapping for this key after an attempt has been
made to load it.
<DT><B>Throws:</B>
<DD><CODE>java.lang.RuntimeException</CODE> - JSR107 should really throw a CacheException here, but the
spec does not allow it. Instead throw a RuntimeException if the underlying load method
throws a CacheException.<DT><B>See Also:</B><DD><A HREF="../../../../net/sf/ehcache/jcache/JCache.html#containsKey(java.lang.Object)"><CODE>containsKey(Object)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="put(java.lang.Object, java.lang.Object)"><!-- --></A><H3>
put</H3>
<PRE>
public java.lang.Object <B>put</B>(java.lang.Object&nbsp;key,
java.lang.Object&nbsp;value)</PRE>
<DL>
<DD>Associates the specified value with the specified key in this map
(optional operation). If the map previously contained a mapping for
this key, the old value is replaced by the specified value. (A map
<tt>m</tt> is said to contain a mapping for a key <tt>k</tt> if and only
if <A HREF="../../../../net/sf/ehcache/jcache/JCache.html#containsKey(java.lang.Object)"><CODE>m.containsKey(k)</CODE></A> would return
<tt>true</tt>.))
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>put</CODE> in interface <CODE>java.util.Map</CODE><DT><B>Specified by:</B><DD><CODE>put</CODE> in interface <CODE>net.sf.jsr107cache.Cache</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - key with which the specified value is to be associated.<DD><CODE>value</CODE> - value to be associated with the specified key.
<DT><B>Returns:</B><DD>previous value associated with specified key, or <tt>null</tt>
if there was no mapping for key. A <tt>null</tt> return can
also indicate that the map previously associated <tt>null</tt>
with the specified key, if the implementation supports
<tt>null</tt> values.</DL>
</DD>
</DL>
<HR>
<A NAME="put(java.lang.Object, java.lang.Object, int)"><!-- --></A><H3>
put</H3>
<PRE>
public java.lang.Object <B>put</B>(java.lang.Object&nbsp;key,
java.lang.Object&nbsp;value,
int&nbsp;timeToLiveSeconds)</PRE>
<DL>
<DD>Associates the specified value with the specified key in this map
(optional operation). If the map previously contained a mapping for
this key, the old value is replaced by the specified value. (A map
<tt>m</tt> is said to contain a mapping for a key <tt>k</tt> if and only
if <A HREF="../../../../net/sf/ehcache/jcache/JCache.html#containsKey(java.lang.Object)"><CODE>m.containsKey(k)</CODE></A> would return
<tt>true</tt>.))
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - key with which the specified value is to be associated.<DD><CODE>value</CODE> - value to be associated with the specified key.<DD><CODE>timeToLiveSeconds</CODE> - the time this entry will live, overriding the default. If timeToLive
is set to 0, the default will be applied.
<DT><B>Returns:</B><DD>previous value associated with specified key, or <tt>null</tt>
if there was no mapping for key. A <tt>null</tt> return can
also indicate that the map previously associated <tt>null</tt>
with the specified key, if the implementation supports
<tt>null</tt> values.</DL>
</DD>
</DL>
<HR>
<A NAME="remove(java.lang.Object)"><!-- --></A><H3>
remove</H3>
<PRE>
public java.lang.Object <B>remove</B>(java.lang.Object&nbsp;key)</PRE>
<DL>
<DD>Removes the mapping for this key from this map if it is present
(optional operation). More formally, if this map contains a mapping
from key <tt>k</tt> to value <tt>v</tt> such that
<code>(key==null ? k==null : key.equals(k))</code>, that mapping
is removed. (The map can contain at most one such mapping.)
<p/>
<p>Returns the value to which the map previously associated the key, or
<tt>null</tt> if the map contained no mapping for this key. (A
<tt>null</tt> return can also indicate that the map previously
associated <tt>null</tt> with the specified key if the implementation
supports <tt>null</tt> values.) The map will not contain a mapping for
the specified key once the call returns.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>remove</CODE> in interface <CODE>java.util.Map</CODE><DT><B>Specified by:</B><DD><CODE>remove</CODE> in interface <CODE>net.sf.jsr107cache.Cache</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - key whose mapping is to be removed from the map.
<DT><B>Returns:</B><DD>previous value associated with specified key, or <tt>null</tt>
if there was no mapping for key.</DL>
</DD>
</DL>
<HR>
<A NAME="putAll(java.util.Map)"><!-- --></A><H3>
putAll</H3>
<PRE>
public void <B>putAll</B>(java.util.Map&nbsp;sourceMap)</PRE>
<DL>
<DD>Copies all of the mappings from the specified map to this map
(optional operation). The effect of this call is equivalent to that
of calling <A HREF="../../../../net/sf/ehcache/jcache/JCache.html#put(java.lang.Object, java.lang.Object)"><CODE>put(k, v)</CODE></A> on this map once
for each mapping from key <tt>k</tt> to value <tt>v</tt> in the
N specified map. The behavior of this operation is unspecified if the
specified map is modified while the operation is in progress.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>putAll</CODE> in interface <CODE>java.util.Map</CODE><DT><B>Specified by:</B><DD><CODE>putAll</CODE> in interface <CODE>net.sf.jsr107cache.Cache</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sourceMap</CODE> - Mappings to be stored in this map.</DL>
</DD>
</DL>
<HR>
<A NAME="clear()"><!-- --></A><H3>
clear</H3>
<PRE>
public void <B>clear</B>()</PRE>
<DL>
<DD>Removes all mappings from this map (optional operation).
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>clear</CODE> in interface <CODE>java.util.Map</CODE><DT><B>Specified by:</B><DD><CODE>clear</CODE> in interface <CODE>net.sf.jsr107cache.Cache</CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="keySet()"><!-- --></A><H3>
keySet</H3>
<PRE>
public java.util.Set <B>keySet</B>()</PRE>
<DL>
<DD>Returns a set view of the keys contained in this map. The set is
not live because ehcache is not backed by a simple map.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>keySet</CODE> in interface <CODE>java.util.Map</CODE><DT><B>Specified by:</B><DD><CODE>keySet</CODE> in interface <CODE>net.sf.jsr107cache.Cache</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>a set view of the keys contained in this map.</DL>
</DD>
</DL>
<HR>
<A NAME="values()"><!-- --></A><H3>
values</H3>
<PRE>
public java.util.Collection <B>values</B>()</PRE>
<DL>
<DD>Returns a collection view of the values contained in this map. The
collection is backed by the map, so changes to the map are reflected in
the collection, and vice-versa. If the map is modified while an
iteration over the collection is in progress (except through the
iterator's own <tt>remove</tt> operation), the results of the
iteration are undefined. The collection supports element removal,
which removes the corresponding mapping from the map, via the
<tt>Iterator.remove</tt>, <tt>Collection.remove</tt>,
<tt>removeAll</tt>, <tt>retainAll</tt> and <tt>clear</tt> operations.
It does not support the add or <tt>addAll</tt> operations.
<p/>
Contradicting the above Map contract, whether cache changes after this method returns are not
reflected in the Collection. This is because ehcache is not backed by a single map.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>values</CODE> in interface <CODE>java.util.Map</CODE><DT><B>Specified by:</B><DD><CODE>values</CODE> in interface <CODE>net.sf.jsr107cache.Cache</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>a collection view of the values contained in this map.</DL>
</DD>
</DL>
<HR>
<A NAME="entrySet()"><!-- --></A><H3>
entrySet</H3>
<PRE>
public java.util.Set <B>entrySet</B>()</PRE>
<DL>
<DD>Returns a set view of the mappings contained in this map. Each element
in the returned set is a <CODE>Map.Entry</CODE>. The set is backed by the
map, so changes to the map are reflected in the set, and vice-versa.
If the map is modified while an iteration over the set is in progress
(except through the iterator's own <tt>remove</tt> operation, or through
the <tt>setValue</tt> operation on a map entry returned by the iterator)
the results of the iteration are undefined. The set supports element
removal, which removes the corresponding mapping from the map, via the
<tt>Iterator.remove</tt>, <tt>Set.remove</tt>, <tt>removeAll</tt>,
<tt>retainAll</tt> and <tt>clear</tt> operations. It does not support
the <tt>add</tt> or <tt>addAll</tt> operations.
<p/>
Contradicting the above Map contract, whether or not changes to an entry affect the entry in the cache is undefined.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>entrySet</CODE> in interface <CODE>java.util.Map</CODE><DT><B>Specified by:</B><DD><CODE>entrySet</CODE> in interface <CODE>net.sf.jsr107cache.Cache</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>a set view of the mappings contained in this map.</DL>
</DD>
</DL>
<HR>
<A NAME="setStatisticsAccuracy(int)"><!-- --></A><H3>
setStatisticsAccuracy</H3>
<PRE>
public void <B>setStatisticsAccuracy</B>(int&nbsp;statisticsAccuracy)</PRE>
<DL>
<DD>Sets the statistics accuracy.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>statisticsAccuracy</CODE> - one of <CODE>CacheStatistics.STATISTICS_ACCURACY_BEST_EFFORT</CODE>, <CODE>CacheStatistics.STATISTICS_ACCURACY_GUARANTEED</CODE>, <CODE>CacheStatistics.STATISTICS_ACCURACY_NONE</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="getBackingCache()"><!-- --></A><H3>
getBackingCache</H3>
<PRE>
public <A HREF="../../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache">Ehcache</A> <B>getBackingCache</B>()</PRE>
<DL>
<DD>Gets the backing Ehcache
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="toString()"><!-- --></A><H3>
toString</H3>
<PRE>
public java.lang.String <B>toString</B>()</PRE>
<DL>
<DD>Returns a <CODE>String</CODE> representation of the underlying <A HREF="../../../../net/sf/ehcache/Cache.html" title="class in net.sf.ehcache"><CODE>Cache</CODE></A>.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>a string representation of the object.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/JCache.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<a href="/" target="_top">ehcache</a></EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../net/sf/ehcache/jcache/JCacheEntry.html" title="class in net.sf.ehcache.jcache"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?net/sf/ehcache/jcache/JCache.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="JCache.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>