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

1339 lines
63 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>
CacheManager (ehcache)
</TITLE>
<META NAME="keywords" CONTENT="net.sf.ehcache.CacheManager class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="CacheManager (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/CacheManager.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/CacheException.html" title="class in net.sf.ehcache"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../net/sf/ehcache/Ehcache.html" title="interface 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/CacheManager.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="CacheManager.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;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
net.sf.ehcache</FONT>
<BR>
Class CacheManager</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>net.sf.ehcache.CacheManager</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>CacheManager</B><DT>extends java.lang.Object</DL>
</PRE>
<P>
A container for <A HREF="../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache"><CODE>Ehcache</CODE></A>s that maintain all aspects of their lifecycle.
<p/>
CacheManager may be either be a singleton if created with factory methods, or multiple instances may exist,
in which case resources required by each must be unique.
<p/>
A CacheManager holds references to Cache, Ehcache, and JCache objects and manages their creation and lifecycle.
<P>
<P>
<DL>
<DT><B>Version:</B></DT>
<DD>$Id: CacheManager.java 612 2008-05-07 22:48:26Z gregluck $</DD>
<DT><B>Author:</B></DT>
<DD>Greg Luck</DD>
</DL>
<HR>
<P>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_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>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.util.List</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/CacheManager.html#ALL_CACHE_MANAGERS">ALL_CACHE_MANAGERS</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Keeps track of all known CacheManagers.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.util.Map</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/CacheManager.html#caches">caches</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Caches managed by this manager.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.util.Map</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/CacheManager.html#ehcaches">ehcaches</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ehcaches managed by this manager.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/CacheManager.html#ENABLE_SHUTDOWN_HOOK_PROPERTY">ENABLE_SHUTDOWN_HOOK_PROPERTY</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System property to enable creation of a shutdown hook for CacheManager.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.util.Map</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/CacheManager.html#jCaches">jCaches</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;JCaches managed by this manager.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../net/sf/ehcache/CacheManager.html#CacheManager()">CacheManager</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../net/sf/ehcache/CacheManager.html#CacheManager(net.sf.ehcache.config.Configuration)">CacheManager</A></B>(<A HREF="../../../net/sf/ehcache/config/Configuration.html" title="class in net.sf.ehcache.config">Configuration</A>&nbsp;configuration)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;An constructor for CacheManager, which takes a configuration object, rather than one created by parsing
an ehcache.xml file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../net/sf/ehcache/CacheManager.html#CacheManager(java.io.InputStream)">CacheManager</A></B>(java.io.InputStream&nbsp;configurationInputStream)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;An ordinary constructor for CacheManager.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../net/sf/ehcache/CacheManager.html#CacheManager(java.lang.String)">CacheManager</A></B>(java.lang.String&nbsp;configurationFileName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;An ordinary constructor for CacheManager.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../net/sf/ehcache/CacheManager.html#CacheManager(java.net.URL)">CacheManager</A></B>(java.net.URL&nbsp;configurationURL)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;An ordinary constructor for CacheManager.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/CacheManager.html#addCache(net.sf.ehcache.Cache)">addCache</A></B>(<A HREF="../../../net/sf/ehcache/Cache.html" title="class in net.sf.ehcache">Cache</A>&nbsp;cache)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a <A HREF="../../../net/sf/ehcache/Cache.html" title="class in net.sf.ehcache"><CODE>Cache</CODE></A> to 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/CacheManager.html#addCache(net.sf.ehcache.Ehcache)">addCache</A></B>(<A HREF="../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache">Ehcache</A>&nbsp;cache)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds an <A HREF="../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache"><CODE>Ehcache</CODE></A> to 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/CacheManager.html#addCache(net.sf.ehcache.jcache.JCache)">addCache</A></B>(<A HREF="../../../net/sf/ehcache/jcache/JCache.html" title="class in net.sf.ehcache.jcache">JCache</A>&nbsp;jCache)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a <A HREF="../../../net/sf/ehcache/Cache.html" title="class in net.sf.ehcache"><CODE>Cache</CODE></A> to 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/CacheManager.html#addCache(java.lang.String)">addCache</A></B>(java.lang.String&nbsp;cacheName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a <A HREF="../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache"><CODE>Ehcache</CODE></A> based on the defaultCache with the given name.</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/CacheManager.html#cacheExists(java.lang.String)">cacheExists</A></B>(java.lang.String&nbsp;cacheName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks whether a cache of type ehcache exists.</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/CacheManager.html#clearAll()">clearAll</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Clears the contents of all caches in the CacheManager, but without
removing any caches.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&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/CacheManager.html#create()">create</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A factory method to create a singleton CacheManager with default config, or return it if it exists.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&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/CacheManager.html#create(java.io.InputStream)">create</A></B>(java.io.InputStream&nbsp;inputStream)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A factory method to create a singleton CacheManager from a java.io.InputStream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&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/CacheManager.html#create(java.lang.String)">create</A></B>(java.lang.String&nbsp;configurationFileName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A factory method to create a singleton CacheManager with a specified configuration.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&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/CacheManager.html#create(java.net.URL)">create</A></B>(java.net.URL&nbsp;configurationFileURL)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A factory method to create a singleton CacheManager from an URL.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../net/sf/ehcache/Cache.html" title="class in net.sf.ehcache">Cache</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/CacheManager.html#getCache(java.lang.String)">getCache</A></B>(java.lang.String&nbsp;name)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a concrete implementation of Cache, it it is available in the CacheManager.</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/CacheManagerEventListener.html" title="interface in net.sf.ehcache.event">CacheManagerEventListener</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/CacheManager.html#getCacheManagerEventListener()">getCacheManagerEventListener</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the composite listener.</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/CacheManagerEventListenerRegistry.html" title="class in net.sf.ehcache.event">CacheManagerEventListenerRegistry</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/CacheManager.html#getCacheManagerEventListenerRegistry()">getCacheManagerEventListenerRegistry</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the CacheManagerEventListenerRegistry.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../net/sf/ehcache/distribution/CacheManagerPeerProvider.html" title="interface in net.sf.ehcache.distribution">CacheManagerPeerProvider</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/CacheManager.html#getCacheManagerPeerProvider()">getCacheManagerPeerProvider</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the CacheManagerPeerProvider, which can be useful for programmatically adding peers.</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/CacheManager.html#getCacheNames()">getCacheNames</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a list of the current cache names.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../net/sf/ehcache/distribution/CacheManagerPeerListener.html" title="interface in net.sf.ehcache.distribution">CacheManagerPeerListener</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/CacheManager.html#getCachePeerListener()">getCachePeerListener</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;When CacheManage is configured as part of a cluster, a CacheManagerPeerListener will
be registered in it.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../net/sf/ehcache/distribution/CacheManagerPeerProvider.html" title="interface in net.sf.ehcache.distribution">CacheManagerPeerProvider</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/CacheManager.html#getCachePeerProvider()">getCachePeerProvider</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the <code>CacheManagerPeerProvider</code>
For distributed caches, the peer provider finds other cache managers and their caches in the same cluster</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/CacheManager.html#getDiskStorePath()">getDiskStorePath</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the disk store path.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache">Ehcache</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/CacheManager.html#getEhcache(java.lang.String)">getEhcache</A></B>(java.lang.String&nbsp;name)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets an Ehcache
<p/></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&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/CacheManager.html#getInstance()">getInstance</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A factory method to create a singleton CacheManager with default config, or return it if it exists.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../net/sf/ehcache/jcache/JCache.html" title="class in net.sf.ehcache.jcache">JCache</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/CacheManager.html#getJCache(java.lang.String)">getJCache</A></B>(java.lang.String&nbsp;name)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets a draft JSR107 spec JCache.</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/CacheManager.html#getName()">getName</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the name of the CacheManager.</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/CacheManager.html#getStatus()">getStatus</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the status attribute of the Ehcache</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/CacheManager.html#removalAll()">removalAll</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes all caches using <A HREF="../../../net/sf/ehcache/CacheManager.html#removeCache(java.lang.String)"><CODE>removeCache(java.lang.String)</CODE></A> for each 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/CacheManager.html#removeCache(java.lang.String)">removeCache</A></B>(java.lang.String&nbsp;cacheName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Remove a cache from 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/CacheManager.html#replaceCacheWithDecoratedCache(net.sf.ehcache.Ehcache, net.sf.ehcache.Ehcache)">replaceCacheWithDecoratedCache</A></B>(<A HREF="../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache">Ehcache</A>&nbsp;ehcache,
<A HREF="../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache">Ehcache</A>&nbsp;decoratedCache)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Replaces in the map of Caches managed by this CacheManager an Ehcache with a decorated version of the same
Ehcache.</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/CacheManager.html#replaceEhcacheWithJCache(net.sf.ehcache.Ehcache, net.sf.ehcache.jcache.JCache)">replaceEhcacheWithJCache</A></B>(<A HREF="../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache">Ehcache</A>&nbsp;ehcache,
<A HREF="../../../net/sf/ehcache/jcache/JCache.html" title="class in net.sf.ehcache.jcache">JCache</A>&nbsp;jCache)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Replaces in the map of Caches managed by this CacheManager an Ehcache with a JCache decorated version of the <i>same</i> (see Ehcache equals method)
Ehcache, in a single synchronized method.</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/CacheManager.html#setCacheManagerEventListener(net.sf.ehcache.event.CacheManagerEventListener)">setCacheManagerEventListener</A></B>(<A HREF="../../../net/sf/ehcache/event/CacheManagerEventListener.html" title="interface in net.sf.ehcache.event">CacheManagerEventListener</A>&nbsp;cacheManagerEventListener)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>Use getCacheManagerEventListenerRegistry instead</I></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/CacheManager.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 name of 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/CacheManager.html#shutdown()">shutdown</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Shuts down the CacheManager.</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/CacheManager.html#toString()">toString</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_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>Field Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="ALL_CACHE_MANAGERS"><!-- --></A><H3>
ALL_CACHE_MANAGERS</H3>
<PRE>
public static final java.util.List <B>ALL_CACHE_MANAGERS</B></PRE>
<DL>
<DD>Keeps track of all known CacheManagers. Used to check on conflicts.
CacheManagers should remove themselves from this list during shut down.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="ENABLE_SHUTDOWN_HOOK_PROPERTY"><!-- --></A><H3>
ENABLE_SHUTDOWN_HOOK_PROPERTY</H3>
<PRE>
public static final java.lang.String <B>ENABLE_SHUTDOWN_HOOK_PROPERTY</B></PRE>
<DL>
<DD>System property to enable creation of a shutdown hook for CacheManager.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#net.sf.ehcache.CacheManager.ENABLE_SHUTDOWN_HOOK_PROPERTY">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="ehcaches"><!-- --></A><H3>
ehcaches</H3>
<PRE>
protected final java.util.Map <B>ehcaches</B></PRE>
<DL>
<DD>Ehcaches managed by this manager.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="caches"><!-- --></A><H3>
caches</H3>
<PRE>
protected final java.util.Map <B>caches</B></PRE>
<DL>
<DD>Caches managed by this manager. A Cache is also an Ehcache.
For central managment the cache is also in the ehcaches map.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="jCaches"><!-- --></A><H3>
jCaches</H3>
<PRE>
protected final java.util.Map <B>jCaches</B></PRE>
<DL>
<DD>JCaches managed by this manager. For each JCache there is a backing ehcache stored in the ehcaches map.
<P>
<DL>
</DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="CacheManager(net.sf.ehcache.config.Configuration)"><!-- --></A><H3>
CacheManager</H3>
<PRE>
public <B>CacheManager</B>(<A HREF="../../../net/sf/ehcache/config/Configuration.html" title="class in net.sf.ehcache.config">Configuration</A>&nbsp;configuration)
throws <A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
<DL>
<DD>An constructor for CacheManager, which takes a configuration object, rather than one created by parsing
an ehcache.xml file. This constructor gives complete control over the creation of the CacheManager.
<p/>
Care should be taken to ensure that, if multiple CacheManages are created, they do now overwrite each others
disk store files, as would happend if two were created which used the same diskStore path.
<p/>
This method does not act as a singleton. Callers must maintain their own reference to it.
<p/>
Note that if one of the <A HREF="../../../net/sf/ehcache/CacheManager.html#create()"><CODE>create()</CODE></A> methods are called, a new singleton instance will be created,
separate from any instances created in this method.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>configuration</CODE> -
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></CODE></DL>
</DL>
<HR>
<A NAME="CacheManager(java.lang.String)"><!-- --></A><H3>
CacheManager</H3>
<PRE>
public <B>CacheManager</B>(java.lang.String&nbsp;configurationFileName)
throws <A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
<DL>
<DD>An ordinary constructor for CacheManager.
This method does not act as a singleton. Callers must maintain a reference to it.
Note that if one of the <A HREF="../../../net/sf/ehcache/CacheManager.html#create()"><CODE>create()</CODE></A> methods are called, a new singleton will be created,
separate from any instances created in this method.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>configurationFileName</CODE> - an xml configuration file available through a file name. The configuration
<CODE>File</CODE> is created
using new <code>File(configurationFileName)</code>
<DT><B>Throws:</B>
<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/CacheManager.html#create(java.lang.String)"><CODE>create(String)</CODE></A></DL>
</DL>
<HR>
<A NAME="CacheManager(java.net.URL)"><!-- --></A><H3>
CacheManager</H3>
<PRE>
public <B>CacheManager</B>(java.net.URL&nbsp;configurationURL)
throws <A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
<DL>
<DD>An ordinary constructor for CacheManager.
This method does not act as a singleton. Callers must maintain a reference to it.
Note that if one of the <A HREF="../../../net/sf/ehcache/CacheManager.html#create()"><CODE>create()</CODE></A> methods are called, a new singleton will be created,
separate from any instances created in this method.
<p/>
This method can be used to specify a configuration resource in the classpath other
than the default of \"/ehcache.xml\":
<pre>
URL url = this.getClass().getResource("/ehcache-2.xml");
</pre>
Note that <CODE>Class.getResource(java.lang.String)</CODE> will look for resources in the same package unless a leading "/"
is used, in which case it will look in the root of the classpath.
<p/>
You can also load a resource using other class loaders. e.g. <CODE>Thread.getContextClassLoader()</CODE>
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>configurationURL</CODE> - an xml configuration available through a URL.
<DT><B>Throws:</B>
<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/CacheManager.html#create(java.net.URL)"><CODE>create(java.net.URL)</CODE></A></DL>
</DL>
<HR>
<A NAME="CacheManager(java.io.InputStream)"><!-- --></A><H3>
CacheManager</H3>
<PRE>
public <B>CacheManager</B>(java.io.InputStream&nbsp;configurationInputStream)
throws <A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
<DL>
<DD>An ordinary constructor for CacheManager.
This method does not act as a singleton. Callers must maintain a reference to it.
Note that if one of the <A HREF="../../../net/sf/ehcache/CacheManager.html#create()"><CODE>create()</CODE></A> methods are called, a new singleton will be created,
separate from any instances created in this method.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>configurationInputStream</CODE> - an xml configuration file available through an inputstream
<DT><B>Throws:</B>
<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/CacheManager.html#create(java.io.InputStream)"><CODE>create(java.io.InputStream)</CODE></A></DL>
</DL>
<HR>
<A NAME="CacheManager()"><!-- --></A><H3>
CacheManager</H3>
<PRE>
public <B>CacheManager</B>()
throws <A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
<DL>
<DD>Constructor.
<P>
<DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></CODE></DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="create()"><!-- --></A><H3>
create</H3>
<PRE>
public static <A HREF="../../../net/sf/ehcache/CacheManager.html" title="class in net.sf.ehcache">CacheManager</A> <B>create</B>()
throws <A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
<DL>
<DD>A factory method to create a singleton CacheManager with default config, or return it if it exists.
<p/>
The configuration will be read, <A HREF="../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache"><CODE>Ehcache</CODE></A>s created and required stores initialized.
When the <A HREF="../../../net/sf/ehcache/CacheManager.html" title="class in net.sf.ehcache"><CODE>CacheManager</CODE></A> is no longer required, call shutdown to free resources.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the singleton CacheManager
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></CODE> - if the CacheManager cannot be created</DL>
</DD>
</DL>
<HR>
<A NAME="getInstance()"><!-- --></A><H3>
getInstance</H3>
<PRE>
public static <A HREF="../../../net/sf/ehcache/CacheManager.html" title="class in net.sf.ehcache">CacheManager</A> <B>getInstance</B>()
throws <A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
<DL>
<DD>A factory method to create a singleton CacheManager with default config, or return it if it exists.
<p/>
This has the same effect as <A HREF="../../../net/sf/ehcache/CacheManager.html#create()"><CODE>create()</CODE></A>
<p/>
Same as <A HREF="../../../net/sf/ehcache/CacheManager.html#create()"><CODE>create()</CODE></A>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the singleton CacheManager
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></CODE> - if the CacheManager cannot be created</DL>
</DD>
</DL>
<HR>
<A NAME="create(java.lang.String)"><!-- --></A><H3>
create</H3>
<PRE>
public static <A HREF="../../../net/sf/ehcache/CacheManager.html" title="class in net.sf.ehcache">CacheManager</A> <B>create</B>(java.lang.String&nbsp;configurationFileName)
throws <A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
<DL>
<DD>A factory method to create a singleton CacheManager with a specified configuration.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>configurationFileName</CODE> - an xml file compliant with the ehcache.xsd schema
<p/>
The configuration will be read, <A HREF="../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache"><CODE>Ehcache</CODE></A>s created and required stores initialized.
When the <A HREF="../../../net/sf/ehcache/CacheManager.html" title="class in net.sf.ehcache"><CODE>CacheManager</CODE></A> is no longer required, call shutdown to free resources.
<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="create(java.net.URL)"><!-- --></A><H3>
create</H3>
<PRE>
public static <A HREF="../../../net/sf/ehcache/CacheManager.html" title="class in net.sf.ehcache">CacheManager</A> <B>create</B>(java.net.URL&nbsp;configurationFileURL)
throws <A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
<DL>
<DD>A factory method to create a singleton CacheManager from an URL.
<p/>
This method can be used to specify a configuration resource in the classpath other
than the default of \"/ehcache.xml\":
This method can be used to specify a configuration resource in the classpath other
than the default of \"/ehcache.xml\":
<pre>
URL url = this.getClass().getResource("/ehcache-2.xml");
</pre>
Note that <CODE>Class.getResource(java.lang.String)</CODE> will look for resources in the same package unless a leading "/"
is used, in which case it will look in the root of the classpath.
<p/>
You can also load a resource using other class loaders. e.g. <CODE>Thread.getContextClassLoader()</CODE>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>configurationFileURL</CODE> - an URL to an xml file compliant with the ehcache.xsd schema
<p/>
The configuration will be read, <A HREF="../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache"><CODE>Ehcache</CODE></A>s created and required stores initialized.
When the <A HREF="../../../net/sf/ehcache/CacheManager.html" title="class in net.sf.ehcache"><CODE>CacheManager</CODE></A> is no longer required, call shutdown to free resources.
<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="create(java.io.InputStream)"><!-- --></A><H3>
create</H3>
<PRE>
public static <A HREF="../../../net/sf/ehcache/CacheManager.html" title="class in net.sf.ehcache">CacheManager</A> <B>create</B>(java.io.InputStream&nbsp;inputStream)
throws <A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
<DL>
<DD>A factory method to create a singleton CacheManager from a java.io.InputStream.
<p/>
This method makes it possible to use an inputstream for configuration.
Note: it is the clients responsibility to close the inputstream.
<p/>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>inputStream</CODE> - InputStream of xml compliant with the ehcache.xsd schema
<p/>
The configuration will be read, <A HREF="../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache"><CODE>Ehcache</CODE></A>s created and required stores initialized.
When the <A HREF="../../../net/sf/ehcache/CacheManager.html" title="class in net.sf.ehcache"><CODE>CacheManager</CODE></A> is no longer required, call shutdown to free resources.
<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="getCache(java.lang.String)"><!-- --></A><H3>
getCache</H3>
<PRE>
public <A HREF="../../../net/sf/ehcache/Cache.html" title="class in net.sf.ehcache">Cache</A> <B>getCache</B>(java.lang.String&nbsp;name)
throws java.lang.IllegalStateException,
java.lang.ClassCastException</PRE>
<DL>
<DD>Returns a concrete implementation of Cache, it it is available in the CacheManager.
Consider using getEhcache(String name) instead, which will return decorated caches that are registered.
<p/>
If a decorated ehcache is registered in CacheManager, an undecorated Cache with the same name will also exist.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>a Cache, if an object of that type exists by that name, else null
<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.ClassCastException</CODE><DT><B>See Also:</B><DD><A HREF="../../../net/sf/ehcache/CacheManager.html#getEhcache(java.lang.String)"><CODE>getEhcache(String)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getEhcache(java.lang.String)"><!-- --></A><H3>
getEhcache</H3>
<PRE>
public <A HREF="../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache">Ehcache</A> <B>getEhcache</B>(java.lang.String&nbsp;name)
throws java.lang.IllegalStateException</PRE>
<DL>
<DD>Gets an Ehcache
<p/>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>a Cache, if an object of type Cache exists by that name, else null
<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="getJCache(java.lang.String)"><!-- --></A><H3>
getJCache</H3>
<PRE>
public <A HREF="../../../net/sf/ehcache/jcache/JCache.html" title="class in net.sf.ehcache.jcache">JCache</A> <B>getJCache</B>(java.lang.String&nbsp;name)
throws java.lang.IllegalStateException</PRE>
<DL>
<DD>Gets a draft JSR107 spec JCache.
<p/>
If a JCache does not exist for the name, but an ehcache does, a new JCache will be created dynamically and added
to the list of JCaches managed by this CacheManager.
Warning: JCache will change as the specification changes, so no guarantee of backward compatibility is made for this method.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>a JSR 107 Cache, if an object of that type exists by that name, else null
<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="addCache(java.lang.String)"><!-- --></A><H3>
addCache</H3>
<PRE>
public void <B>addCache</B>(java.lang.String&nbsp;cacheName)
throws java.lang.IllegalStateException,
<A HREF="../../../net/sf/ehcache/ObjectExistsException.html" title="class in net.sf.ehcache">ObjectExistsException</A>,
<A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
<DL>
<DD>Adds a <A HREF="../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache"><CODE>Ehcache</CODE></A> based on the defaultCache with the given name.
<p/>
Memory and Disk stores will be configured for it and it will be added
to the map of caches.
<p/>
Also notifies the CacheManagerEventListener after the cache was initialised and added.
<p/>
It will be created with the defaultCache attributes specified in ehcache.xml
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cacheName</CODE> - the name for the cache
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../net/sf/ehcache/ObjectExistsException.html" title="class in net.sf.ehcache">ObjectExistsException</A></CODE> - if the cache already exists
<DD><CODE><A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></CODE> - if there was an error creating the cache.
<DD><CODE>java.lang.IllegalStateException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="addCache(net.sf.ehcache.Cache)"><!-- --></A><H3>
addCache</H3>
<PRE>
public void <B>addCache</B>(<A HREF="../../../net/sf/ehcache/Cache.html" title="class in net.sf.ehcache">Cache</A>&nbsp;cache)
throws java.lang.IllegalStateException,
<A HREF="../../../net/sf/ehcache/ObjectExistsException.html" title="class in net.sf.ehcache">ObjectExistsException</A>,
<A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
<DL>
<DD>Adds a <A HREF="../../../net/sf/ehcache/Cache.html" title="class in net.sf.ehcache"><CODE>Cache</CODE></A> to the CacheManager.
<p/>
Memory and Disk stores will be configured for it and it will be added to the map of caches.
Also notifies the CacheManagerEventListener after the cache was initialised and added.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cache</CODE> -
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalStateException</CODE> - if the cache is not <A HREF="../../../net/sf/ehcache/Status.html#STATUS_UNINITIALISED"><CODE>Status.STATUS_UNINITIALISED</CODE></A> before this method is called.
<DD><CODE><A HREF="../../../net/sf/ehcache/ObjectExistsException.html" title="class in net.sf.ehcache">ObjectExistsException</A></CODE> - if the cache already exists in the CacheManager
<DD><CODE><A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></CODE> - if there was an error adding the cache to the CacheManager</DL>
</DD>
</DL>
<HR>
<A NAME="addCache(net.sf.ehcache.jcache.JCache)"><!-- --></A><H3>
addCache</H3>
<PRE>
public void <B>addCache</B>(<A HREF="../../../net/sf/ehcache/jcache/JCache.html" title="class in net.sf.ehcache.jcache">JCache</A>&nbsp;jCache)
throws java.lang.IllegalStateException,
<A HREF="../../../net/sf/ehcache/ObjectExistsException.html" title="class in net.sf.ehcache">ObjectExistsException</A>,
<A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
<DL>
<DD>Adds a <A HREF="../../../net/sf/ehcache/Cache.html" title="class in net.sf.ehcache"><CODE>Cache</CODE></A> to the CacheManager.
<p/>
Memory and Disk stores will be configured for it and it will be added to the map of caches.
Also notifies the CacheManagerEventListener after the cache was initialised and added.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>jCache</CODE> -
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalStateException</CODE> - if the cache is not <A HREF="../../../net/sf/ehcache/Status.html#STATUS_UNINITIALISED"><CODE>Status.STATUS_UNINITIALISED</CODE></A> before this method is called.
<DD><CODE><A HREF="../../../net/sf/ehcache/ObjectExistsException.html" title="class in net.sf.ehcache">ObjectExistsException</A></CODE> - if the cache already exists in the CacheManager
<DD><CODE><A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></CODE> - if there was an error adding the cache to the CacheManager</DL>
</DD>
</DL>
<HR>
<A NAME="addCache(net.sf.ehcache.Ehcache)"><!-- --></A><H3>
addCache</H3>
<PRE>
public void <B>addCache</B>(<A HREF="../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache">Ehcache</A>&nbsp;cache)
throws java.lang.IllegalStateException,
<A HREF="../../../net/sf/ehcache/ObjectExistsException.html" title="class in net.sf.ehcache">ObjectExistsException</A>,
<A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
<DL>
<DD>Adds an <A HREF="../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache"><CODE>Ehcache</CODE></A> to the CacheManager.
<p/>
Memory and Disk stores will be configured for it and it will be added to the map of caches.
Also notifies the CacheManagerEventListener after the cache was initialised and added.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cache</CODE> -
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalStateException</CODE> - if the cache is not <A HREF="../../../net/sf/ehcache/Status.html#STATUS_UNINITIALISED"><CODE>Status.STATUS_UNINITIALISED</CODE></A> before this method is called.
<DD><CODE><A HREF="../../../net/sf/ehcache/ObjectExistsException.html" title="class in net.sf.ehcache">ObjectExistsException</A></CODE> - if the cache already exists in the CacheManager
<DD><CODE><A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></CODE> - if there was an error adding the cache to the CacheManager</DL>
</DD>
</DL>
<HR>
<A NAME="cacheExists(java.lang.String)"><!-- --></A><H3>
cacheExists</H3>
<PRE>
public boolean <B>cacheExists</B>(java.lang.String&nbsp;cacheName)
throws java.lang.IllegalStateException</PRE>
<DL>
<DD>Checks whether a cache of type ehcache exists.
<p/>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cacheName</CODE> - the cache name to check for
<DT><B>Returns:</B><DD>true if it exists
<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="removalAll()"><!-- --></A><H3>
removalAll</H3>
<PRE>
public void <B>removalAll</B>()</PRE>
<DL>
<DD>Removes all caches using <A HREF="../../../net/sf/ehcache/CacheManager.html#removeCache(java.lang.String)"><CODE>removeCache(java.lang.String)</CODE></A> for each cache.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="removeCache(java.lang.String)"><!-- --></A><H3>
removeCache</H3>
<PRE>
public void <B>removeCache</B>(java.lang.String&nbsp;cacheName)
throws java.lang.IllegalStateException</PRE>
<DL>
<DD>Remove a cache from the CacheManager. The cache is disposed of.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cacheName</CODE> - the cache name
<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="shutdown()"><!-- --></A><H3>
shutdown</H3>
<PRE>
public void <B>shutdown</B>()</PRE>
<DL>
<DD>Shuts down the CacheManager.
<p/>
If the shutdown occurs on the singleton, then the singleton is removed, so that if a singleton access method
is called, a new singleton will be created.
<p/>
By default there is no shutdown hook (ehcache-1.3-beta2 and higher).
<p/>
Set the system property net.sf.ehcache.enableShutdownHook=true to turn it on.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getCacheNames()"><!-- --></A><H3>
getCacheNames</H3>
<PRE>
public java.lang.String[] <B>getCacheNames</B>()
throws java.lang.IllegalStateException</PRE>
<DL>
<DD>Returns a list of the current cache names.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>an array of <CODE>String</CODE>s
<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>
public <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 Ehcache
<P>
<DD><DL>
<DT><B>Returns:</B><DD>The status value from the Status enum class</DL>
</DD>
</DL>
<HR>
<A NAME="clearAll()"><!-- --></A><H3>
clearAll</H3>
<PRE>
public void <B>clearAll</B>()
throws <A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
<DL>
<DD>Clears the contents of all caches in the CacheManager, but without
removing any caches.
<p/>
This method is not synchronized. It only guarantees to clear those elements in a cache
at the time that the <A HREF="../../../net/sf/ehcache/Ehcache.html#removeAll()"><CODE>Ehcache.removeAll()</CODE></A> mehod on each cache is called.
<P>
<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="getCachePeerProvider()"><!-- --></A><H3>
getCachePeerProvider</H3>
<PRE>
public <A HREF="../../../net/sf/ehcache/distribution/CacheManagerPeerProvider.html" title="interface in net.sf.ehcache.distribution">CacheManagerPeerProvider</A> <B>getCachePeerProvider</B>()</PRE>
<DL>
<DD>Gets the <code>CacheManagerPeerProvider</code>
For distributed caches, the peer provider finds other cache managers and their caches in the same cluster
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the provider, or null if one does not exist</DL>
</DD>
</DL>
<HR>
<A NAME="getCachePeerListener()"><!-- --></A><H3>
getCachePeerListener</H3>
<PRE>
public <A HREF="../../../net/sf/ehcache/distribution/CacheManagerPeerListener.html" title="interface in net.sf.ehcache.distribution">CacheManagerPeerListener</A> <B>getCachePeerListener</B>()</PRE>
<DL>
<DD>When CacheManage is configured as part of a cluster, a CacheManagerPeerListener will
be registered in it. Use this to access the individual cache listeners
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the listener, or null if one does not exist</DL>
</DD>
</DL>
<HR>
<A NAME="getCacheManagerEventListener()"><!-- --></A><H3>
getCacheManagerEventListener</H3>
<PRE>
public <A HREF="../../../net/sf/ehcache/event/CacheManagerEventListener.html" title="interface in net.sf.ehcache.event">CacheManagerEventListener</A> <B>getCacheManagerEventListener</B>()</PRE>
<DL>
<DD>Returns the composite listener. A notification sent to this listener will notify all registered
listeners.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>null if none<DT><B>See Also:</B><DD>"getCacheManagerEventListenerRegistry"</DL>
</DD>
</DL>
<HR>
<A NAME="setCacheManagerEventListener(net.sf.ehcache.event.CacheManagerEventListener)"><!-- --></A><H3>
setCacheManagerEventListener</H3>
<PRE>
public void <B>setCacheManagerEventListener</B>(<A HREF="../../../net/sf/ehcache/event/CacheManagerEventListener.html" title="interface in net.sf.ehcache.event">CacheManagerEventListener</A>&nbsp;cacheManagerEventListener)</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<I>Use getCacheManagerEventListenerRegistry instead</I>
<P>
<DD>Same as getCacheManagerEventListenerRegistry().registerListener(cacheManagerEventListener);
Left for backward compatiblity
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cacheManagerEventListener</CODE> - the listener to set.<DT><B>See Also:</B><DD>"getCacheManagerEventListenerRegistry"</DL>
</DD>
</DL>
<HR>
<A NAME="getCacheManagerEventListenerRegistry()"><!-- --></A><H3>
getCacheManagerEventListenerRegistry</H3>
<PRE>
public <A HREF="../../../net/sf/ehcache/event/CacheManagerEventListenerRegistry.html" title="class in net.sf.ehcache.event">CacheManagerEventListenerRegistry</A> <B>getCacheManagerEventListenerRegistry</B>()</PRE>
<DL>
<DD>Gets the CacheManagerEventListenerRegistry. Add and remove listeners here.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getCacheManagerPeerProvider()"><!-- --></A><H3>
getCacheManagerPeerProvider</H3>
<PRE>
public <A HREF="../../../net/sf/ehcache/distribution/CacheManagerPeerProvider.html" title="interface in net.sf.ehcache.distribution">CacheManagerPeerProvider</A> <B>getCacheManagerPeerProvider</B>()</PRE>
<DL>
<DD>Gets the CacheManagerPeerProvider, which can be useful for programmatically adding peers. Adding peers
will only be useful if the peer providers are manually provided rather than automatically discovered, otherwise
they will go stale.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the CacheManagerPeerProvider, or null if there is not one.</DL>
</DD>
</DL>
<HR>
<A NAME="replaceCacheWithDecoratedCache(net.sf.ehcache.Ehcache, net.sf.ehcache.Ehcache)"><!-- --></A><H3>
replaceCacheWithDecoratedCache</H3>
<PRE>
public void <B>replaceCacheWithDecoratedCache</B>(<A HREF="../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache">Ehcache</A>&nbsp;ehcache,
<A HREF="../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache">Ehcache</A>&nbsp;decoratedCache)
throws <A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
<DL>
<DD>Replaces in the map of Caches managed by this CacheManager an Ehcache with a decorated version of the same
Ehcache. CacheManager can operate fully with a decorated Ehcache.
<p/>
Ehcache Decorators can be used to obtain different behaviour from an Ehcache in a very flexible way. Some examples in
ehcache are:
<ol>
<li><A HREF="../../../net/sf/ehcache/constructs/blocking/BlockingCache.html" title="class in net.sf.ehcache.constructs.blocking"><CODE>BlockingCache</CODE></A> - A cache that blocks other threads from getting a null element until the first thread
has placed a value in it.
<li><A HREF="../../../net/sf/ehcache/constructs/blocking/SelfPopulatingCache.html" title="class in net.sf.ehcache.constructs.blocking"><CODE>SelfPopulatingCache</CODE></A> - A BlockingCache that has the additional
property of knowing how to load its own entries.
</ol>
Many other kinds are possible.
<p/>
It is generally required that a decorated cache, once constructed, is made available to other execution threads.
The simplest way of doing this is to substitute the original cache for the decorated one here.
<p/>
Note that any overwritten Ehcache methods will take on new behaviours without casting. Casting is only required
for new methods that the decorator introduces.
For more information see the well known Gang of Four Decorator pattern.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ehcache</CODE> - <DD><CODE>decoratedCache</CODE> - An implementation of Ehcache that wraps the original cache.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></CODE> - if the two caches do not equal each other.</DL>
</DD>
</DL>
<HR>
<A NAME="replaceEhcacheWithJCache(net.sf.ehcache.Ehcache, net.sf.ehcache.jcache.JCache)"><!-- --></A><H3>
replaceEhcacheWithJCache</H3>
<PRE>
public void <B>replaceEhcacheWithJCache</B>(<A HREF="../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache">Ehcache</A>&nbsp;ehcache,
<A HREF="../../../net/sf/ehcache/jcache/JCache.html" title="class in net.sf.ehcache.jcache">JCache</A>&nbsp;jCache)
throws <A HREF="../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
<DL>
<DD>Replaces in the map of Caches managed by this CacheManager an Ehcache with a JCache decorated version of the <i>same</i> (see Ehcache equals method)
Ehcache, in a single synchronized method.
<p/>
Warning: JCache will change as the specification changes, so no guarantee of backward compatibility is made for this method.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ehcache</CODE> - <DD><CODE>jCache</CODE> - A JCache that wraps the original cache.
<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="getName()"><!-- --></A><H3>
getName</H3>
<PRE>
public java.lang.String <B>getName</B>()</PRE>
<DL>
<DD>Gets the name of the CacheManager. This is useful for distinguishing multiple CacheManagers
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the name, or the output of toString() if it is not set.<DT><B>See Also:</B><DD><A HREF="../../../net/sf/ehcache/CacheManager.html#toString()"><CODE>which uses either the name or Object.toString()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setName(java.lang.String)"><!-- --></A><H3>
setName</H3>
<PRE>
public void <B>setName</B>(java.lang.String&nbsp;name)</PRE>
<DL>
<DD>Sets the name of the CacheManager. This is useful for distinguishing multiple CacheManagers
in a monitoring situation.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - a name with characters legal in a JMX ObjectName</DL>
</DD>
</DL>
<HR>
<A NAME="toString()"><!-- --></A><H3>
toString</H3>
<PRE>
public java.lang.String <B>toString</B>()</PRE>
<DL>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>either the name of this CacheManager, or if unset, Object.toString()</DL>
</DD>
</DL>
<HR>
<A NAME="getDiskStorePath()"><!-- --></A><H3>
getDiskStorePath</H3>
<PRE>
public java.lang.String <B>getDiskStorePath</B>()</PRE>
<DL>
<DD>Returns the disk store path. This may be null if no caches need a DiskStore and none was configured.
The path cannot be changed after creation of the CacheManager. All caches take the disk store path
from this value.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the disk store path.</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/CacheManager.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/CacheException.html" title="class in net.sf.ehcache"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../net/sf/ehcache/Ehcache.html" title="interface 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/CacheManager.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="CacheManager.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;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>