cloudstack/thirdparty/ehcache/docs/net/sf/ehcache/Ehcache.html

2405 lines
98 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:39 EST 2008 -->
<TITLE>
Ehcache (ehcache)
</TITLE>
<META NAME="keywords" CONTENT="net.sf.ehcache.Ehcache interface">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="Ehcache (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/Ehcache.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;<A HREF="../../../net/sf/ehcache/CacheManager.html" title="class in net.sf.ehcache"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?net/sf/ehcache/Ehcache.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="Ehcache.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;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&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</FONT>
<BR>
Interface Ehcache</H2>
<DL>
<DT><B>All Superinterfaces:</B> <DD>java.lang.Cloneable</DD>
</DL>
<DL>
<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../net/sf/ehcache/constructs/blocking/BlockingCache.html" title="class in net.sf.ehcache.constructs.blocking">BlockingCache</A>, <A HREF="../../../net/sf/ehcache/Cache.html" title="class in net.sf.ehcache">Cache</A>, <A HREF="../../../net/sf/ehcache/constructs/blocking/SelfPopulatingCache.html" title="class in net.sf.ehcache.constructs.blocking">SelfPopulatingCache</A>, <A HREF="../../../net/sf/ehcache/constructs/blocking/UpdatingSelfPopulatingCache.html" title="class in net.sf.ehcache.constructs.blocking">UpdatingSelfPopulatingCache</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public interface <B>Ehcache</B><DT>extends java.lang.Cloneable</DL>
</PRE>
<P>
An interface for Ehcache.
<p/>
Ehcache is the central interface. Caches have <A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache"><CODE>Element</CODE></A>s and are managed
by the <A HREF="../../../net/sf/ehcache/CacheManager.html" title="class in net.sf.ehcache"><CODE>CacheManager</CODE></A>. The Cache performs logical actions. It delegates physical
implementations to its <A HREF="../../../net/sf/ehcache/store/Store.html" title="interface in net.sf.ehcache.store"><CODE>Store</CODE></A>s.
<p/>
A reference to an EhCache can be obtained through the <A HREF="../../../net/sf/ehcache/CacheManager.html" title="class in net.sf.ehcache"><CODE>CacheManager</CODE></A>. An Ehcache thus obtained
is guaranteed to have status <A HREF="../../../net/sf/ehcache/Status.html#STATUS_ALIVE"><CODE>Status.STATUS_ALIVE</CODE></A>. This status is checked for any method which
throws <CODE>IllegalStateException</CODE> and the same thrown if it is not alive. This would normally
happen if a call is made after <A HREF="../../../net/sf/ehcache/CacheManager.html#shutdown()"><CODE>CacheManager.shutdown()</CODE></A> is invoked.
<p/>
Statistics on cache usage are collected and made available through public methods.
<P>
<P>
<DL>
<DT><B>Version:</B></DT>
<DD>$Id: Ehcache.java 704 2008-07-13 00:17:52Z gregluck $</DD>
<DT><B>Author:</B></DT>
<DD>Greg Luck</DD>
</DL>
<HR>
<P>
<!-- ========== 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/Ehcache.html#bootstrap()">bootstrap</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bootstrap command.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Ehcache.html#calculateInMemorySize()">calculateInMemorySize</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the size of the memory store for this cache
<p/>
Warning: This method can be very expensive to run.</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/Ehcache.html#clearStatistics()">clearStatistics</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resets statistics counters back to 0.</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/Ehcache.html#clone()">clone</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Clones a 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/Ehcache.html#dispose()">dispose</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Flushes all cache items from memory to auxilliary caches and close the auxilliary caches.</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/Ehcache.html#evictExpiredElements()">evictExpiredElements</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Causes all elements stored in the Cache to be synchronously checked for expiry, and if expired, evicted.</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/Ehcache.html#flush()">flush</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Flushes all cache items from memory to the disk store, and from the DiskStore to disk.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache">Element</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Ehcache.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;Gets an element from the cache.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache">Element</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Ehcache.html#get(java.io.Serializable)">get</A></B>(java.io.Serializable&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets an element from the cache.</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/Ehcache.html#getAllWithLoader(java.util.Collection, java.lang.Object)">getAllWithLoader</A></B>(java.util.Collection&nbsp;keys,
java.lang.Object&nbsp;loaderArgument)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Warning: This method is related to the JSR107 specification, which is in draft.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Ehcache.html#getAverageGetTime()">getAverageGetTime</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The average get time in ms.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../net/sf/ehcache/bootstrap/BootstrapCacheLoader.html" title="interface in net.sf.ehcache.bootstrap">BootstrapCacheLoader</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Ehcache.html#getBootstrapCacheLoader()">getBootstrapCacheLoader</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Accessor for the BootstrapCacheLoader associated with this cache.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../net/sf/ehcache/config/CacheConfiguration.html" title="class in net.sf.ehcache.config">CacheConfiguration</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Ehcache.html#getCacheConfiguration()">getCacheConfiguration</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the cache configuration this cache was created with.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../net/sf/ehcache/event/RegisteredEventListeners.html" title="class in net.sf.ehcache.event">RegisteredEventListeners</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Ehcache.html#getCacheEventNotificationService()">getCacheEventNotificationService</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use this to access the service in order to register and unregister listeners</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../net/sf/ehcache/exceptionhandler/CacheExceptionHandler.html" title="interface in net.sf.ehcache.exceptionhandler">CacheExceptionHandler</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Ehcache.html#getCacheExceptionHandler()">getCacheExceptionHandler</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets an ExceptionHandler on the Cache.</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/Ehcache.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;<A HREF="../../../net/sf/ehcache/CacheManager.html" title="class in net.sf.ehcache">CacheManager</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Ehcache.html#getCacheManager()">getCacheManager</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the CacheManager managing this cache.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Ehcache.html#getDiskExpiryThreadIntervalSeconds()">getDiskExpiryThreadIntervalSeconds</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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/Ehcache.html#getDiskStoreSize()">getDiskStoreSize</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of elements in the disk store.</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/Ehcache.html#getGuid()">getGuid</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The GUID for this cache instance can be used to determine whether two cache instance references
are pointing to the same cache.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.List</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Ehcache.html#getKeys()">getKeys</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a list of all elements in the cache, whether or not they are expired.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.List</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Ehcache.html#getKeysNoDuplicateCheck()">getKeysNoDuplicateCheck</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a list of all elements in the cache, whether or not they are expired.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.List</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Ehcache.html#getKeysWithExpiryCheck()">getKeysWithExpiryCheck</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a list of all elements in the cache.</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/Ehcache.html#getMaxElementsInMemory()">getMaxElementsInMemory</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the maximum number of elements to hold in memory.</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/Ehcache.html#getMaxElementsOnDisk()">getMaxElementsOnDisk</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the maximum number of elements to hold on Disk.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../net/sf/ehcache/store/MemoryStoreEvictionPolicy.html" title="class in net.sf.ehcache.store">MemoryStoreEvictionPolicy</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Ehcache.html#getMemoryStoreEvictionPolicy()">getMemoryStoreEvictionPolicy</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The policy used to evict elements from the <A HREF="../../../net/sf/ehcache/store/MemoryStore.html" title="class in net.sf.ehcache.store"><CODE>MemoryStore</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Ehcache.html#getMemoryStoreSize()">getMemoryStoreSize</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of elements in the memory store.</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/Ehcache.html#getName()">getName</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the cache name.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache">Element</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Ehcache.html#getQuiet(java.lang.Object)">getQuiet</A></B>(java.lang.Object&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets an element from the cache, without updating Element statistics.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache">Element</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Ehcache.html#getQuiet(java.io.Serializable)">getQuiet</A></B>(java.io.Serializable&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets an element from the cache, without updating Element statistics.</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/Ehcache.html#getSize()">getSize</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the size of the cache.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../net/sf/ehcache/Statistics.html" title="class in net.sf.ehcache">Statistics</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Ehcache.html#getStatistics()">getStatistics</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;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Ehcache.html#getStatisticsAccuracy()">getStatisticsAccuracy</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Accurately measuring statistics can be expensive.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../net/sf/ehcache/Status.html" title="class in net.sf.ehcache">Status</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Ehcache.html#getStatus()">getStatus</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the status attribute of the Cache.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Ehcache.html#getTimeToIdleSeconds()">getTimeToIdleSeconds</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets timeToIdleSeconds.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Ehcache.html#getTimeToLiveSeconds()">getTimeToLiveSeconds</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets timeToLiveSeconds.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache">Element</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Ehcache.html#getWithLoader(java.lang.Object, net.sf.ehcache.loader.CacheLoader, java.lang.Object)">getWithLoader</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;Warning: This method is related to the JSR107 specification, which is in draft.</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/Ehcache.html#initialise()">initialise</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Newly created caches do not have a <A HREF="../../../net/sf/ehcache/store/MemoryStore.html" title="class in net.sf.ehcache.store"><CODE>MemoryStore</CODE></A> or a <A HREF="../../../net/sf/ehcache/store/DiskStore.html" title="class in net.sf.ehcache.store"><CODE>DiskStore</CODE></A>.</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/Ehcache.html#isDisabled()">isDisabled</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Whether this cache is disabled.</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/Ehcache.html#isDiskPersistent()">isDiskPersistent</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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/Ehcache.html#isElementInMemory(java.lang.Object)">isElementInMemory</A></B>(java.lang.Object&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Whether an Element is stored in the cache in Memory, indicating a very low cost of retrieval.</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/Ehcache.html#isElementInMemory(java.io.Serializable)">isElementInMemory</A></B>(java.io.Serializable&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Whether an Element is stored in the cache in Memory, indicating a very low cost of retrieval.</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/Ehcache.html#isElementOnDisk(java.lang.Object)">isElementOnDisk</A></B>(java.lang.Object&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Whether an Element is stored in the cache on Disk, indicating a higher cost of retrieval.</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/Ehcache.html#isElementOnDisk(java.io.Serializable)">isElementOnDisk</A></B>(java.io.Serializable&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Whether an Element is stored in the cache on Disk, indicating a higher cost of retrieval.</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/Ehcache.html#isEternal()">isEternal</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Are elements eternal.</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/Ehcache.html#isExpired(net.sf.ehcache.Element)">isExpired</A></B>(<A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache">Element</A>&nbsp;element)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks whether this cache element has expired.</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/Ehcache.html#isKeyInCache(java.lang.Object)">isKeyInCache</A></B>(java.lang.Object&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;An inexpensive check to see if the key exists in the cache.</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/Ehcache.html#isOverflowToDisk()">isOverflowToDisk</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Does the overflow go to disk.</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/Ehcache.html#isValueInCache(java.lang.Object)">isValueInCache</A></B>(java.lang.Object&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;An extremely expensive check to see if the value exists in 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/Ehcache.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;Warning: This method is related to the JSR107 specification, which is in draft.</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/Ehcache.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;Warning: This method is related to the JSR107 specification, which is in draft.</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/Ehcache.html#put(net.sf.ehcache.Element)">put</A></B>(<A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache">Element</A>&nbsp;element)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Put an element in 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/Ehcache.html#put(net.sf.ehcache.Element, boolean)">put</A></B>(<A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache">Element</A>&nbsp;element,
boolean&nbsp;doNotNotifyCacheReplicators)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Put an element in 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/Ehcache.html#putQuiet(net.sf.ehcache.Element)">putQuiet</A></B>(<A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache">Element</A>&nbsp;element)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Put an element in the cache, without updating statistics, or updating 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/Ehcache.html#registerCacheExtension(net.sf.ehcache.extension.CacheExtension)">registerCacheExtension</A></B>(<A HREF="../../../net/sf/ehcache/extension/CacheExtension.html" title="interface in net.sf.ehcache.extension">CacheExtension</A>&nbsp;cacheExtension)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Register a <A HREF="../../../net/sf/ehcache/extension/CacheExtension.html" title="interface in net.sf.ehcache.extension"><CODE>CacheExtension</CODE></A> with the cache.</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/Ehcache.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 an <A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache"><CODE>Element</CODE></A> from the Cache.</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/Ehcache.html#remove(java.lang.Object, boolean)">remove</A></B>(java.lang.Object&nbsp;key,
boolean&nbsp;doNotNotifyCacheReplicators)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes an <A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache"><CODE>Element</CODE></A> from the Cache.</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/Ehcache.html#remove(java.io.Serializable)">remove</A></B>(java.io.Serializable&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes an <A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache"><CODE>Element</CODE></A> from the Cache.</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/Ehcache.html#remove(java.io.Serializable, boolean)">remove</A></B>(java.io.Serializable&nbsp;key,
boolean&nbsp;doNotNotifyCacheReplicators)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes an <A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache"><CODE>Element</CODE></A> from 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/Ehcache.html#removeAll()">removeAll</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes all cached items.</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/Ehcache.html#removeAll(boolean)">removeAll</A></B>(boolean&nbsp;doNotNotifyCacheReplicators)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes all cached items.</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/Ehcache.html#removeQuiet(java.lang.Object)">removeQuiet</A></B>(java.lang.Object&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes an <A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache"><CODE>Element</CODE></A> from the Cache, without notifying listeners.</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/Ehcache.html#removeQuiet(java.io.Serializable)">removeQuiet</A></B>(java.io.Serializable&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes an <A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache"><CODE>Element</CODE></A> from the Cache, without notifying 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/Ehcache.html#setBootstrapCacheLoader(net.sf.ehcache.bootstrap.BootstrapCacheLoader)">setBootstrapCacheLoader</A></B>(<A HREF="../../../net/sf/ehcache/bootstrap/BootstrapCacheLoader.html" title="interface in net.sf.ehcache.bootstrap">BootstrapCacheLoader</A>&nbsp;bootstrapCacheLoader)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the bootstrap cache loader.</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/Ehcache.html#setCacheExceptionHandler(net.sf.ehcache.exceptionhandler.CacheExceptionHandler)">setCacheExceptionHandler</A></B>(<A HREF="../../../net/sf/ehcache/exceptionhandler/CacheExceptionHandler.html" title="interface in net.sf.ehcache.exceptionhandler">CacheExceptionHandler</A>&nbsp;cacheExceptionHandler)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets an ExceptionHandler on 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/Ehcache.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/Ehcache.html#setCacheManager(net.sf.ehcache.CacheManager)">setCacheManager</A></B>(<A HREF="../../../net/sf/ehcache/CacheManager.html" title="class in net.sf.ehcache">CacheManager</A>&nbsp;cacheManager)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the CacheManager</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/Ehcache.html#setDisabled(boolean)">setDisabled</A></B>(boolean&nbsp;disabled)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Disables or enables this 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/Ehcache.html#setDiskStorePath(java.lang.String)">setDiskStorePath</A></B>(java.lang.String&nbsp;diskStorePath)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DiskStore paths can conflict between CacheManager instances.</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/Ehcache.html#setName(java.lang.String)">setName</A></B>(java.lang.String&nbsp;name)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the cache name which will name.</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/Ehcache.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;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Ehcache.html#toString()">toString</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a <CODE>String</CODE> representation of <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;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Ehcache.html#unregisterCacheExtension(net.sf.ehcache.extension.CacheExtension)">unregisterCacheExtension</A></B>(<A HREF="../../../net/sf/ehcache/extension/CacheExtension.html" title="interface in net.sf.ehcache.extension">CacheExtension</A>&nbsp;cacheExtension)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Unregister a <A HREF="../../../net/sf/ehcache/extension/CacheExtension.html" title="interface in net.sf.ehcache.extension"><CODE>CacheExtension</CODE></A> with the cache.</TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ 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="put(net.sf.ehcache.Element)"><!-- --></A><H3>
put</H3>
<PRE>
void <B>put</B>(<A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache">Element</A>&nbsp;element)
throws java.lang.IllegalArgumentException,
java.lang.IllegalStateException,
<A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
<DL>
<DD>Put an element in the cache.
<p/>
Resets the access statistics on the element, which would be the case if it has previously been
gotten from a cache, and is now being put back.
<p/>
Also notifies the CacheEventListener that:
<ul>
<li>the element was put, but only if the Element was actually put.
<li>if the element exists in the cache, that an update has occurred, even if the element would be expired
if it was requested
</ul>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>element</CODE> - An object. If Serializable it can fully participate in replication and the DiskStore.
<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>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the element is null
<DD><CODE><A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="put(net.sf.ehcache.Element, boolean)"><!-- --></A><H3>
put</H3>
<PRE>
void <B>put</B>(<A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache">Element</A>&nbsp;element,
boolean&nbsp;doNotNotifyCacheReplicators)
throws java.lang.IllegalArgumentException,
java.lang.IllegalStateException,
<A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
<DL>
<DD>Put an element in the cache.
<p/>
Resets the access statistics on the element, which would be the case if it has previously been
gotten from a cache, and is now being put back.
<p/>
Also notifies the CacheEventListener that:
<ul>
<li>the element was put, but only if the Element was actually put.
<li>if the element exists in the cache, that an update has occurred, even if the element would be expired
if it was requested
</ul>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>element</CODE> - An object. If Serializable it can fully participate in replication and the DiskStore.<DD><CODE>doNotNotifyCacheReplicators</CODE> - whether the put is coming from a doNotNotifyCacheReplicators cache peer, in which case this put should not initiate a
further notification to doNotNotifyCacheReplicators cache peers
<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>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the element is null
<DD><CODE><A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="putQuiet(net.sf.ehcache.Element)"><!-- --></A><H3>
putQuiet</H3>
<PRE>
void <B>putQuiet</B>(<A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache">Element</A>&nbsp;element)
throws java.lang.IllegalArgumentException,
java.lang.IllegalStateException,
<A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
<DL>
<DD>Put an element in the cache, without updating statistics, or updating listeners. This is meant to be used
in conjunction with <A HREF="../../../net/sf/ehcache/Ehcache.html#getQuiet(java.io.Serializable)"><CODE>getQuiet(java.io.Serializable)</CODE></A>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>element</CODE> - An object. If Serializable it can fully participate in replication and the DiskStore.
<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>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the element is null
<DD><CODE><A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="get(java.io.Serializable)"><!-- --></A><H3>
get</H3>
<PRE>
<A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache">Element</A> <B>get</B>(java.io.Serializable&nbsp;key)
throws java.lang.IllegalStateException,
<A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
<DL>
<DD>Gets an element from the cache. Updates Element Statistics
<p/>
Note that the Element's lastAccessTime is always the time of this get.
Use <A HREF="../../../net/sf/ehcache/Ehcache.html#getQuiet(java.lang.Object)"><CODE>getQuiet(Object)</CODE></A> to peak into the Element to see its last access time with get
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - a serializable value
<DT><B>Returns:</B><DD>the element, or null, if it does not exist.
<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>
<DD><CODE><A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../../net/sf/ehcache/Ehcache.html#isExpired(net.sf.ehcache.Element)"><CODE>isExpired(net.sf.ehcache.Element)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="get(java.lang.Object)"><!-- --></A><H3>
get</H3>
<PRE>
<A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache">Element</A> <B>get</B>(java.lang.Object&nbsp;key)
throws java.lang.IllegalStateException,
<A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
<DL>
<DD>Gets an element from the cache. Updates Element Statistics
<p/>
Note that the Element's lastAccessTime is always the time of this get.
Use <A HREF="../../../net/sf/ehcache/Ehcache.html#getQuiet(java.lang.Object)"><CODE>getQuiet(Object)</CODE></A> to peak into the Element to see its last access time with get
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - an Object value
<DT><B>Returns:</B><DD>the element, or null, if it does not exist.
<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>
<DD><CODE><A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></CODE><DT><B>Since:</B></DT>
<DD>1.2</DD>
<DT><B>See Also:</B><DD><A HREF="../../../net/sf/ehcache/Ehcache.html#isExpired(net.sf.ehcache.Element)"><CODE>isExpired(net.sf.ehcache.Element)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getQuiet(java.io.Serializable)"><!-- --></A><H3>
getQuiet</H3>
<PRE>
<A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache">Element</A> <B>getQuiet</B>(java.io.Serializable&nbsp;key)
throws java.lang.IllegalStateException,
<A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
<DL>
<DD>Gets an element from the cache, without updating Element statistics. Cache statistics are
still updated.
<p/>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - a serializable value
<DT><B>Returns:</B><DD>the element, or null, if it does not exist.
<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>
<DD><CODE><A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../../net/sf/ehcache/Ehcache.html#isExpired(net.sf.ehcache.Element)"><CODE>isExpired(net.sf.ehcache.Element)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getQuiet(java.lang.Object)"><!-- --></A><H3>
getQuiet</H3>
<PRE>
<A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache">Element</A> <B>getQuiet</B>(java.lang.Object&nbsp;key)
throws java.lang.IllegalStateException,
<A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
<DL>
<DD>Gets an element from the cache, without updating Element statistics. Cache statistics are
also not updated.
<p/>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - a serializable value
<DT><B>Returns:</B><DD>the element, or null, if it does not exist.
<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>
<DD><CODE><A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></CODE><DT><B>Since:</B></DT>
<DD>1.2</DD>
<DT><B>See Also:</B><DD><A HREF="../../../net/sf/ehcache/Ehcache.html#isExpired(net.sf.ehcache.Element)"><CODE>isExpired(net.sf.ehcache.Element)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getKeys()"><!-- --></A><H3>
getKeys</H3>
<PRE>
java.util.List <B>getKeys</B>()
throws java.lang.IllegalStateException,
<A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
<DL>
<DD>Returns a list of all elements in the cache, whether or not they are expired.
<p/>
The returned keys are unique and can be considered a set.
<p/>
The List returned is not live. It is a copy.
<p/>
The time taken is O(n). On a single cpu 1.8Ghz P4, approximately 8ms is required
for each 1000 entries.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>a list of <CODE>Object</CODE> keys
<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>
<DD><CODE><A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="getKeysWithExpiryCheck()"><!-- --></A><H3>
getKeysWithExpiryCheck</H3>
<PRE>
java.util.List <B>getKeysWithExpiryCheck</B>()
throws java.lang.IllegalStateException,
<A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
<DL>
<DD>Returns a list of all elements in the cache. Only keys of non-expired
elements are returned.
<p/>
The returned keys are unique and can be considered a set.
<p/>
The List returned is not live. It is a copy.
<p/>
The time taken is O(n), where n is the number of elements in the cache. On
a 1.8Ghz P4, the time taken is approximately 200ms per 1000 entries. This method
is not synchronized, because it relies on a non-live list returned from <A HREF="../../../net/sf/ehcache/Ehcache.html#getKeys()"><CODE>getKeys()</CODE></A>
, which is synchronised, and which takes 8ms per 1000 entries. This way
cache liveness is preserved, even if this method is very slow to return.
<p/>
Consider whether your usage requires checking for expired keys. Because
this method takes so long, depending on cache settings, the list could be
quite out of date by the time you get it.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>a list of <CODE>Object</CODE> keys
<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>
<DD><CODE><A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="getKeysNoDuplicateCheck()"><!-- --></A><H3>
getKeysNoDuplicateCheck</H3>
<PRE>
java.util.List <B>getKeysNoDuplicateCheck</B>()
throws java.lang.IllegalStateException</PRE>
<DL>
<DD>Returns a list of all elements in the cache, whether or not they are expired.
<p/>
The returned keys are not unique and may contain duplicates. If the cache is only
using the memory store, the list will be unique. If the disk store is being used
as well, it will likely contain duplicates, because of the internal store design.
<p/>
The List returned is not live. It is a copy.
<p/>
The time taken is O(log n). On a single cpu 1.8Ghz P4, approximately 6ms is required
for 1000 entries and 36 for 50000.
<p/>
This is the fastest getKeys method
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>a list of <CODE>Object</CODE> keys
<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="remove(java.io.Serializable)"><!-- --></A><H3>
remove</H3>
<PRE>
boolean <B>remove</B>(java.io.Serializable&nbsp;key)
throws java.lang.IllegalStateException</PRE>
<DL>
<DD>Removes an <A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache"><CODE>Element</CODE></A> from the Cache. This also removes it from any
stores it may be in.
<p/>
Also notifies the CacheEventListener after the element was removed.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> -
<DT><B>Returns:</B><DD>true if the element was removed, false if it was not found in the cache
<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="remove(java.lang.Object)"><!-- --></A><H3>
remove</H3>
<PRE>
boolean <B>remove</B>(java.lang.Object&nbsp;key)
throws java.lang.IllegalStateException</PRE>
<DL>
<DD>Removes an <A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache"><CODE>Element</CODE></A> from the Cache. This also removes it from any
stores it may be in.
<p/>
Also notifies the CacheEventListener after the element was removed, but only if an Element
with the key actually existed.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> -
<DT><B>Returns:</B><DD>true if the element was removed, false if it was not found in the cache
<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><DT><B>Since:</B></DT>
<DD>1.2</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="remove(java.io.Serializable, boolean)"><!-- --></A><H3>
remove</H3>
<PRE>
boolean <B>remove</B>(java.io.Serializable&nbsp;key,
boolean&nbsp;doNotNotifyCacheReplicators)
throws java.lang.IllegalStateException</PRE>
<DL>
<DD>Removes an <A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache"><CODE>Element</CODE></A> from the Cache. This also removes it from any
stores it may be in.
<p/>
Also notifies the CacheEventListener after the element was removed, but only if an Element
with the key actually existed.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - <DD><CODE>doNotNotifyCacheReplicators</CODE> - whether the put is coming from a doNotNotifyCacheReplicators cache peer, in which case this put should not initiate a
further notification to doNotNotifyCacheReplicators cache peers
<DT><B>Returns:</B><DD>true if the element was removed, false if it was not found in the cache
<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="remove(java.lang.Object, boolean)"><!-- --></A><H3>
remove</H3>
<PRE>
boolean <B>remove</B>(java.lang.Object&nbsp;key,
boolean&nbsp;doNotNotifyCacheReplicators)
throws java.lang.IllegalStateException</PRE>
<DL>
<DD>Removes an <A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache"><CODE>Element</CODE></A> from the Cache. This also removes it from any
stores it may be in.
<p/>
Also notifies the CacheEventListener after the element was removed, but only if an Element
with the key actually existed.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - <DD><CODE>doNotNotifyCacheReplicators</CODE> - whether the put is coming from a doNotNotifyCacheReplicators cache peer, in which case this put should not initiate a
further notification to doNotNotifyCacheReplicators cache peers
<DT><B>Returns:</B><DD>true if the element was removed, false if it was not found in the cache
<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="removeQuiet(java.io.Serializable)"><!-- --></A><H3>
removeQuiet</H3>
<PRE>
boolean <B>removeQuiet</B>(java.io.Serializable&nbsp;key)
throws java.lang.IllegalStateException</PRE>
<DL>
<DD>Removes an <A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache"><CODE>Element</CODE></A> from the Cache, without notifying listeners. This also removes it from any
stores it may be in.
<p/>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> -
<DT><B>Returns:</B><DD>true if the element was removed, false if it was not found in the cache
<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="removeQuiet(java.lang.Object)"><!-- --></A><H3>
removeQuiet</H3>
<PRE>
boolean <B>removeQuiet</B>(java.lang.Object&nbsp;key)
throws java.lang.IllegalStateException</PRE>
<DL>
<DD>Removes an <A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache"><CODE>Element</CODE></A> from the Cache, without notifying listeners. This also removes it from any
stores it may be in.
<p/>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> -
<DT><B>Returns:</B><DD>true if the element was removed, false if it was not found in the cache
<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><DT><B>Since:</B></DT>
<DD>1.2</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="removeAll()"><!-- --></A><H3>
removeAll</H3>
<PRE>
void <B>removeAll</B>()
throws java.lang.IllegalStateException,
<A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
<DL>
<DD>Removes all cached items.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<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>
<DD><CODE><A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="removeAll(boolean)"><!-- --></A><H3>
removeAll</H3>
<PRE>
void <B>removeAll</B>(boolean&nbsp;doNotNotifyCacheReplicators)
throws java.lang.IllegalStateException,
<A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
<DL>
<DD>Removes all cached items.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>doNotNotifyCacheReplicators</CODE> - whether the put is coming from a doNotNotifyCacheReplicators cache peer,
in which case this put should not initiate a further notification to doNotNotifyCacheReplicators cache peers
<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>
<DD><CODE><A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="flush()"><!-- --></A><H3>
flush</H3>
<PRE>
void <B>flush</B>()
throws java.lang.IllegalStateException,
<A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
<DL>
<DD>Flushes all cache items from memory to the disk store, and from the DiskStore to disk.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<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>
<DD><CODE><A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="getSize()"><!-- --></A><H3>
getSize</H3>
<PRE>
int <B>getSize</B>()
throws java.lang.IllegalStateException,
<A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
<DL>
<DD>Gets the size of the cache. This is a subtle concept. See below.
<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.
<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/>
To get an exact size, which would exclude expired elements, use <A HREF="../../../net/sf/ehcache/Ehcache.html#getKeysWithExpiryCheck()"><CODE>getKeysWithExpiryCheck()</CODE></A>.size(),
although see that method for the approximate time that would take.
<p/>
To get a very fast result, use <A HREF="../../../net/sf/ehcache/Ehcache.html#getKeysNoDuplicateCheck()"><CODE>getKeysNoDuplicateCheck()</CODE></A>.size(). If the disk store
is being used, there will be some duplicates.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>The size value
<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>
<DD><CODE><A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="calculateInMemorySize()"><!-- --></A><H3>
calculateInMemorySize</H3>
<PRE>
long <B>calculateInMemorySize</B>()
throws java.lang.IllegalStateException,
<A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
<DL>
<DD>Gets the size of the memory store for this cache
<p/>
Warning: This method can be very expensive to run. Allow approximately 1 second
per 1MB of entries. Running this method could create liveness problems
because the object lock is held for a long period
<p/>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the approximate size of the memory store in bytes
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalStateException</CODE>
<DD><CODE><A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="getMemoryStoreSize()"><!-- --></A><H3>
getMemoryStoreSize</H3>
<PRE>
long <B>getMemoryStoreSize</B>()
throws java.lang.IllegalStateException</PRE>
<DL>
<DD>Returns the number of elements in the memory store.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the number of elements in the memory store
<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="getDiskStoreSize()"><!-- --></A><H3>
getDiskStoreSize</H3>
<PRE>
int <B>getDiskStoreSize</B>()
throws java.lang.IllegalStateException</PRE>
<DL>
<DD>Returns the number of elements in the disk store.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the number of elements in the disk store.
<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="getStatus()"><!-- --></A><H3>
getStatus</H3>
<PRE>
<A HREF="../../../net/sf/ehcache/Status.html" title="class in net.sf.ehcache">Status</A> <B>getStatus</B>()</PRE>
<DL>
<DD>Gets the status attribute of the Cache.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>The status value from the Status enum class</DL>
</DD>
</DL>
<HR>
<A NAME="getName()"><!-- --></A><H3>
getName</H3>
<PRE>
java.lang.String <B>getName</B>()</PRE>
<DL>
<DD>Gets the cache name.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setName(java.lang.String)"><!-- --></A><H3>
setName</H3>
<PRE>
void <B>setName</B>(java.lang.String&nbsp;name)</PRE>
<DL>
<DD>Sets the cache name which will name.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the cache. Should not be null.</DL>
</DD>
</DL>
<HR>
<A NAME="getTimeToIdleSeconds()"><!-- --></A><H3>
getTimeToIdleSeconds</H3>
<PRE>
long <B>getTimeToIdleSeconds</B>()</PRE>
<DL>
<DD>Gets timeToIdleSeconds.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getTimeToLiveSeconds()"><!-- --></A><H3>
getTimeToLiveSeconds</H3>
<PRE>
long <B>getTimeToLiveSeconds</B>()</PRE>
<DL>
<DD>Gets timeToLiveSeconds.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="isEternal()"><!-- --></A><H3>
isEternal</H3>
<PRE>
boolean <B>isEternal</B>()</PRE>
<DL>
<DD>Are elements eternal.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="isOverflowToDisk()"><!-- --></A><H3>
isOverflowToDisk</H3>
<PRE>
boolean <B>isOverflowToDisk</B>()</PRE>
<DL>
<DD>Does the overflow go to disk.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getMaxElementsInMemory()"><!-- --></A><H3>
getMaxElementsInMemory</H3>
<PRE>
int <B>getMaxElementsInMemory</B>()</PRE>
<DL>
<DD>Gets the maximum number of elements to hold in memory.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getMaxElementsOnDisk()"><!-- --></A><H3>
getMaxElementsOnDisk</H3>
<PRE>
int <B>getMaxElementsOnDisk</B>()</PRE>
<DL>
<DD>Gets the maximum number of elements to hold on Disk.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getMemoryStoreEvictionPolicy()"><!-- --></A><H3>
getMemoryStoreEvictionPolicy</H3>
<PRE>
<A HREF="../../../net/sf/ehcache/store/MemoryStoreEvictionPolicy.html" title="class in net.sf.ehcache.store">MemoryStoreEvictionPolicy</A> <B>getMemoryStoreEvictionPolicy</B>()</PRE>
<DL>
<DD>The policy used to evict elements from the <A HREF="../../../net/sf/ehcache/store/MemoryStore.html" title="class in net.sf.ehcache.store"><CODE>MemoryStore</CODE></A>.
This can be one of:
<ol>
<li>LRU - least recently used
<li>LFU - least frequently used
<li>FIFO - first in first out, the oldest element by creation time
</ol>
The default value is LRU
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Since:</B></DT>
<DD>1.2</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="toString()"><!-- --></A><H3>
toString</H3>
<PRE>
java.lang.String <B>toString</B>()</PRE>
<DL>
<DD>Returns a <CODE>String</CODE> representation of <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>
</DL>
</DD>
</DL>
<HR>
<A NAME="isExpired(net.sf.ehcache.Element)"><!-- --></A><H3>
isExpired</H3>
<PRE>
boolean <B>isExpired</B>(<A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache">Element</A>&nbsp;element)
throws java.lang.IllegalStateException,
java.lang.NullPointerException</PRE>
<DL>
<DD>Checks whether this cache element has expired.
<p/>
The element is expired if:
<ol>
<li> the idle time is non-zero and has elapsed, unless the cache is eternal; or
<li> the time to live is non-zero and has elapsed, unless the cache is eternal; or
<li> the value of the element is null.
</ol>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>element</CODE> - the element to check
<DT><B>Returns:</B><DD>true if it has expired
<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>
<DD><CODE>java.lang.NullPointerException</CODE> - if the element is null</DL>
</DD>
</DL>
<HR>
<A NAME="clone()"><!-- --></A><H3>
clone</H3>
<PRE>
java.lang.Object <B>clone</B>()
throws java.lang.CloneNotSupportedException</PRE>
<DL>
<DD>Clones a cache. This is only legal if the cache has not been
initialized. At that point only primitives have been set and no
<A HREF="../../../net/sf/ehcache/store/MemoryStore.html" title="class in net.sf.ehcache.store"><CODE>MemoryStore</CODE></A> or <A HREF="../../../net/sf/ehcache/store/DiskStore.html" title="class in net.sf.ehcache.store"><CODE>DiskStore</CODE></A> has been created.
<p/>
A new, empty, RegisteredEventListeners is created on clone.
<p/>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>an object of type <A HREF="../../../net/sf/ehcache/Cache.html" title="class in net.sf.ehcache"><CODE>Cache</CODE></A>
<DT><B>Throws:</B>
<DD><CODE>java.lang.CloneNotSupportedException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="isDiskPersistent()"><!-- --></A><H3>
isDiskPersistent</H3>
<PRE>
boolean <B>isDiskPersistent</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>true if the cache overflows to disk and the disk is persistent between restarts</DL>
</DD>
</DL>
<HR>
<A NAME="getDiskExpiryThreadIntervalSeconds()"><!-- --></A><H3>
getDiskExpiryThreadIntervalSeconds</H3>
<PRE>
long <B>getDiskExpiryThreadIntervalSeconds</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the interval between runs
of the expiry thread, where it checks the disk store for expired elements. It is not the
the timeToLiveSeconds.</DL>
</DD>
</DL>
<HR>
<A NAME="getCacheEventNotificationService()"><!-- --></A><H3>
getCacheEventNotificationService</H3>
<PRE>
<A HREF="../../../net/sf/ehcache/event/RegisteredEventListeners.html" title="class in net.sf.ehcache.event">RegisteredEventListeners</A> <B>getCacheEventNotificationService</B>()</PRE>
<DL>
<DD>Use this to access the service in order to register and unregister listeners
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the RegisteredEventListeners instance for this cache.</DL>
</DD>
</DL>
<HR>
<A NAME="isElementInMemory(java.io.Serializable)"><!-- --></A><H3>
isElementInMemory</H3>
<PRE>
boolean <B>isElementInMemory</B>(java.io.Serializable&nbsp;key)</PRE>
<DL>
<DD>Whether an Element is stored in the cache in Memory, indicating a very low cost of retrieval.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>true if an element matching the key is found in memory</DL>
</DD>
</DL>
<HR>
<A NAME="isElementInMemory(java.lang.Object)"><!-- --></A><H3>
isElementInMemory</H3>
<PRE>
boolean <B>isElementInMemory</B>(java.lang.Object&nbsp;key)</PRE>
<DL>
<DD>Whether an Element is stored in the cache in Memory, indicating a very low cost of retrieval.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>true if an element matching the key is found in memory<DT><B>Since:</B></DT>
<DD>1.2</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="isElementOnDisk(java.io.Serializable)"><!-- --></A><H3>
isElementOnDisk</H3>
<PRE>
boolean <B>isElementOnDisk</B>(java.io.Serializable&nbsp;key)</PRE>
<DL>
<DD>Whether an Element is stored in the cache on Disk, indicating a higher cost of retrieval.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>true if an element matching the key is found in the diskStore</DL>
</DD>
</DL>
<HR>
<A NAME="isElementOnDisk(java.lang.Object)"><!-- --></A><H3>
isElementOnDisk</H3>
<PRE>
boolean <B>isElementOnDisk</B>(java.lang.Object&nbsp;key)</PRE>
<DL>
<DD>Whether an Element is stored in the cache on Disk, indicating a higher cost of retrieval.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>true if an element matching the key is found in the diskStore<DT><B>Since:</B></DT>
<DD>1.2</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="getGuid()"><!-- --></A><H3>
getGuid</H3>
<PRE>
java.lang.String <B>getGuid</B>()</PRE>
<DL>
<DD>The GUID for this cache instance can be used to determine whether two cache instance references
are pointing to the same cache.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the globally unique identifier for this cache instance. This is guaranteed to be unique.<DT><B>Since:</B></DT>
<DD>1.2</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="getCacheManager()"><!-- --></A><H3>
getCacheManager</H3>
<PRE>
<A HREF="../../../net/sf/ehcache/CacheManager.html" title="class in net.sf.ehcache">CacheManager</A> <B>getCacheManager</B>()</PRE>
<DL>
<DD>Gets the CacheManager managing this cache. For a newly created cache this will be null until
it has been added to a CacheManager.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the manager or null if there is none</DL>
</DD>
</DL>
<HR>
<A NAME="clearStatistics()"><!-- --></A><H3>
clearStatistics</H3>
<PRE>
void <B>clearStatistics</B>()</PRE>
<DL>
<DD>Resets statistics counters back to 0.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getStatisticsAccuracy()"><!-- --></A><H3>
getStatisticsAccuracy</H3>
<PRE>
int <B>getStatisticsAccuracy</B>()</PRE>
<DL>
<DD>Accurately measuring statistics can be expensive. Returns the current accuracy setting.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>one of <A HREF="../../../net/sf/ehcache/Statistics.html#STATISTICS_ACCURACY_BEST_EFFORT"><CODE>Statistics.STATISTICS_ACCURACY_BEST_EFFORT</CODE></A>, <A HREF="../../../net/sf/ehcache/Statistics.html#STATISTICS_ACCURACY_GUARANTEED"><CODE>Statistics.STATISTICS_ACCURACY_GUARANTEED</CODE></A>, <A HREF="../../../net/sf/ehcache/Statistics.html#STATISTICS_ACCURACY_NONE"><CODE>Statistics.STATISTICS_ACCURACY_NONE</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setStatisticsAccuracy(int)"><!-- --></A><H3>
setStatisticsAccuracy</H3>
<PRE>
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 <A HREF="../../../net/sf/ehcache/Statistics.html#STATISTICS_ACCURACY_BEST_EFFORT"><CODE>Statistics.STATISTICS_ACCURACY_BEST_EFFORT</CODE></A>, <A HREF="../../../net/sf/ehcache/Statistics.html#STATISTICS_ACCURACY_GUARANTEED"><CODE>Statistics.STATISTICS_ACCURACY_GUARANTEED</CODE></A>, <A HREF="../../../net/sf/ehcache/Statistics.html#STATISTICS_ACCURACY_NONE"><CODE>Statistics.STATISTICS_ACCURACY_NONE</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="evictExpiredElements()"><!-- --></A><H3>
evictExpiredElements</H3>
<PRE>
void <B>evictExpiredElements</B>()</PRE>
<DL>
<DD>Causes all elements stored in the Cache to be synchronously checked for expiry, and if expired, evicted.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="isKeyInCache(java.lang.Object)"><!-- --></A><H3>
isKeyInCache</H3>
<PRE>
boolean <B>isKeyInCache</B>(java.lang.Object&nbsp;key)</PRE>
<DL>
<DD>An inexpensive check to see if the key exists in the cache.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key to check for
<DT><B>Returns:</B><DD>true if an Element matching the key is found in the cache. No assertions are made about the state of the Element.</DL>
</DD>
</DL>
<HR>
<A NAME="isValueInCache(java.lang.Object)"><!-- --></A><H3>
isValueInCache</H3>
<PRE>
boolean <B>isValueInCache</B>(java.lang.Object&nbsp;value)</PRE>
<DL>
<DD>An extremely expensive check to see if the value exists in the cache.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - to check for
<DT><B>Returns:</B><DD>true if an Element matching the key is found in the cache. No assertions are made about the state of the Element.</DL>
</DD>
</DL>
<HR>
<A NAME="getStatistics()"><!-- --></A><H3>
getStatistics</H3>
<PRE>
<A HREF="../../../net/sf/ehcache/Statistics.html" title="class in net.sf.ehcache">Statistics</A> <B>getStatistics</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 <A HREF="../../../net/sf/ehcache/Statistics.html#STATISTICS_ACCURACY_BEST_EFFORT"><CODE>Statistics.STATISTICS_ACCURACY_BEST_EFFORT</CODE></A>.
<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 <A HREF="../../../net/sf/ehcache/Statistics.html#STATISTICS_ACCURACY_GUARANTEED"><CODE>Statistics.STATISTICS_ACCURACY_GUARANTEED</CODE></A>.
<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 <A HREF="../../../net/sf/ehcache/Statistics.html#STATISTICS_ACCURACY_NONE"><CODE>Statistics.STATISTICS_ACCURACY_NONE</CODE></A>.
<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>
</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="setCacheManager(net.sf.ehcache.CacheManager)"><!-- --></A><H3>
setCacheManager</H3>
<PRE>
void <B>setCacheManager</B>(<A HREF="../../../net/sf/ehcache/CacheManager.html" title="class in net.sf.ehcache">CacheManager</A>&nbsp;cacheManager)</PRE>
<DL>
<DD>Sets the CacheManager
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cacheManager</CODE> - the CacheManager for this cache to use.</DL>
</DD>
</DL>
<HR>
<A NAME="getBootstrapCacheLoader()"><!-- --></A><H3>
getBootstrapCacheLoader</H3>
<PRE>
<A HREF="../../../net/sf/ehcache/bootstrap/BootstrapCacheLoader.html" title="interface in net.sf.ehcache.bootstrap">BootstrapCacheLoader</A> <B>getBootstrapCacheLoader</B>()</PRE>
<DL>
<DD>Accessor for the BootstrapCacheLoader associated with this cache. For testing purposes.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the BootstrapCacheLoader to use</DL>
</DD>
</DL>
<HR>
<A NAME="setBootstrapCacheLoader(net.sf.ehcache.bootstrap.BootstrapCacheLoader)"><!-- --></A><H3>
setBootstrapCacheLoader</H3>
<PRE>
void <B>setBootstrapCacheLoader</B>(<A HREF="../../../net/sf/ehcache/bootstrap/BootstrapCacheLoader.html" title="interface in net.sf.ehcache.bootstrap">BootstrapCacheLoader</A>&nbsp;bootstrapCacheLoader)
throws <A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
<DL>
<DD>Sets the bootstrap cache loader.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>bootstrapCacheLoader</CODE> - the loader to be used
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></CODE> - if this method is called after the cache is initialized</DL>
</DD>
</DL>
<HR>
<A NAME="setDiskStorePath(java.lang.String)"><!-- --></A><H3>
setDiskStorePath</H3>
<PRE>
void <B>setDiskStorePath</B>(java.lang.String&nbsp;diskStorePath)
throws <A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
<DL>
<DD>DiskStore paths can conflict between CacheManager instances. This method allows the path to be changed.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>diskStorePath</CODE> - the new path to be used.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></CODE> - if this method is called after the cache is initialized</DL>
</DD>
</DL>
<HR>
<A NAME="initialise()"><!-- --></A><H3>
initialise</H3>
<PRE>
void <B>initialise</B>()</PRE>
<DL>
<DD>Newly created caches do not have a <A HREF="../../../net/sf/ehcache/store/MemoryStore.html" title="class in net.sf.ehcache.store"><CODE>MemoryStore</CODE></A> or a <A HREF="../../../net/sf/ehcache/store/DiskStore.html" title="class in net.sf.ehcache.store"><CODE>DiskStore</CODE></A>.
<p/>
This method creates those and makes the cache ready to accept elements
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="bootstrap()"><!-- --></A><H3>
bootstrap</H3>
<PRE>
void <B>bootstrap</B>()</PRE>
<DL>
<DD>Bootstrap command. This must be called after the Cache is intialised, during
CacheManager initialisation. If loads are synchronous, they will complete before the CacheManager
initialise completes, otherwise they will happen in the background.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="dispose()"><!-- --></A><H3>
dispose</H3>
<PRE>
void <B>dispose</B>()
throws java.lang.IllegalStateException</PRE>
<DL>
<DD>Flushes all cache items from memory to auxilliary caches and close the auxilliary caches.
<p/>
Should be invoked only by CacheManager.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<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="getCacheConfiguration()"><!-- --></A><H3>
getCacheConfiguration</H3>
<PRE>
<A HREF="../../../net/sf/ehcache/config/CacheConfiguration.html" title="class in net.sf.ehcache.config">CacheConfiguration</A> <B>getCacheConfiguration</B>()</PRE>
<DL>
<DD>Gets the cache configuration this cache was created with.
<p/>
Things like listeners that are added dynamically are excluded.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="registerCacheExtension(net.sf.ehcache.extension.CacheExtension)"><!-- --></A><H3>
registerCacheExtension</H3>
<PRE>
void <B>registerCacheExtension</B>(<A HREF="../../../net/sf/ehcache/extension/CacheExtension.html" title="interface in net.sf.ehcache.extension">CacheExtension</A>&nbsp;cacheExtension)</PRE>
<DL>
<DD>Register a <A HREF="../../../net/sf/ehcache/extension/CacheExtension.html" title="interface in net.sf.ehcache.extension"><CODE>CacheExtension</CODE></A> with the cache. It will then be tied into the cache lifecycle.
<p/>
If the CacheExtension is not initialised, initialise it.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="unregisterCacheExtension(net.sf.ehcache.extension.CacheExtension)"><!-- --></A><H3>
unregisterCacheExtension</H3>
<PRE>
void <B>unregisterCacheExtension</B>(<A HREF="../../../net/sf/ehcache/extension/CacheExtension.html" title="interface in net.sf.ehcache.extension">CacheExtension</A>&nbsp;cacheExtension)</PRE>
<DL>
<DD>Unregister a <A HREF="../../../net/sf/ehcache/extension/CacheExtension.html" title="interface in net.sf.ehcache.extension"><CODE>CacheExtension</CODE></A> with the cache. It will then be detached from the cache lifecycle.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getAverageGetTime()"><!-- --></A><H3>
getAverageGetTime</H3>
<PRE>
float <B>getAverageGetTime</B>()</PRE>
<DL>
<DD>The average get time in ms.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setCacheExceptionHandler(net.sf.ehcache.exceptionhandler.CacheExceptionHandler)"><!-- --></A><H3>
setCacheExceptionHandler</H3>
<PRE>
void <B>setCacheExceptionHandler</B>(<A HREF="../../../net/sf/ehcache/exceptionhandler/CacheExceptionHandler.html" title="interface in net.sf.ehcache.exceptionhandler">CacheExceptionHandler</A>&nbsp;cacheExceptionHandler)</PRE>
<DL>
<DD>Sets an ExceptionHandler on the Cache. If one is already set, it is overwritten.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getCacheExceptionHandler()"><!-- --></A><H3>
getCacheExceptionHandler</H3>
<PRE>
<A HREF="../../../net/sf/ehcache/exceptionhandler/CacheExceptionHandler.html" title="interface in net.sf.ehcache.exceptionhandler">CacheExceptionHandler</A> <B>getCacheExceptionHandler</B>()</PRE>
<DL>
<DD>Sets an ExceptionHandler on the Cache. If one is already set, it is overwritten.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setCacheLoader(net.sf.ehcache.loader.CacheLoader)"><!-- --></A><H3>
setCacheLoader</H3>
<PRE>
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</DL>
</DD>
</DL>
<HR>
<A NAME="getCacheLoader()"><!-- --></A><H3>
getCacheLoader</H3>
<PRE>
<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="getWithLoader(java.lang.Object, net.sf.ehcache.loader.CacheLoader, java.lang.Object)"><!-- --></A><H3>
getWithLoader</H3>
<PRE>
<A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache">Element</A> <B>getWithLoader</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 <A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
<DL>
<DD>Warning: This method is related to the JSR107 specification, which is in draft. It is subject to change without notice.
<p/>
This 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. That is either the CacheLoader passed in, or if null, the one associated with the cache.
If both are null, no load is performed and null is returned.
<p/>
Because this method may take a long time to complete, it is not synchronized. The underlying cache operations
are synchronized.
<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> - the override loader to use. If null, the cache's default loader will be used<DD><CODE>loaderArgument</CODE> - an argument to pass to the CacheLoader.
<DT><B>Returns:</B><DD>an element if it existed or could be loaded, otherwise null
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="getAllWithLoader(java.util.Collection, java.lang.Object)"><!-- --></A><H3>
getAllWithLoader</H3>
<PRE>
java.util.Map <B>getAllWithLoader</B>(java.util.Collection&nbsp;keys,
java.lang.Object&nbsp;loaderArgument)
throws <A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
<DL>
<DD>Warning: This method is related to the JSR107 specification, which is in draft. It is subject to change without notice.
<p/>
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/>
<p/>
Note. If the getAll exceeds the maximum cache size, the returned map will necessarily be less than the number specified.
<p/>
Because this method may take a long time to complete, it is not synchronized. The underlying cache operations
are synchronized.
<p/>
The constructs package provides similar functionality 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>Parameters:</B><DD><CODE>keys</CODE> - a collection of keys to be returned/loaded<DD><CODE>loaderArgument</CODE> - an argument to pass to the CacheLoader.
<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><A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="load(java.lang.Object)"><!-- --></A><H3>
load</H3>
<PRE>
void <B>load</B>(java.lang.Object&nbsp;key)
throws <A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
<DL>
<DD>Warning: This method is related to the JSR107 specification, which is in draft. It is subject to change without notice.
<p/>
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>
</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><A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="loadAll(java.util.Collection, java.lang.Object)"><!-- --></A><H3>
loadAll</H3>
<PRE>
void <B>loadAll</B>(java.util.Collection&nbsp;keys,
java.lang.Object&nbsp;argument)
throws <A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
<DL>
<DD>Warning: This method is related to the JSR107 specification, which is in draft. It is subject to change without notice.
<p/>
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><A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="isDisabled()"><!-- --></A><H3>
isDisabled</H3>
<PRE>
boolean <B>isDisabled</B>()</PRE>
<DL>
<DD>Whether this cache is disabled. "Disabled" means:
<ol>
<li>bootstrap is disabled
<li>puts are discarded
<li>putQuites are discarded
</ol>
In all other respects the cache continues as it is.
<p/>
You can disable and enable a cache programmatically through the <A HREF="../../../net/sf/ehcache/Ehcache.html#setDisabled(boolean)"><CODE>setDisabled(boolean)</CODE></A> method.
<p/>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>true if the cache is disabled.</DL>
</DD>
</DL>
<HR>
<A NAME="setDisabled(boolean)"><!-- --></A><H3>
setDisabled</H3>
<PRE>
void <B>setDisabled</B>(boolean&nbsp;disabled)</PRE>
<DL>
<DD>Disables or enables this cache. This call overrides the previous value of disabled.
<p/>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>disabled</CODE> - true if you wish to disable, false to enable<DT><B>See Also:</B><DD><A HREF="../../../net/sf/ehcache/Ehcache.html#isDisabled()"><CODE>isDisabled()</CODE></A></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/Ehcache.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;<A HREF="../../../net/sf/ehcache/CacheManager.html" title="class in net.sf.ehcache"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?net/sf/ehcache/Ehcache.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="Ehcache.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;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&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>