mirror of https://github.com/apache/cloudstack.git
314 lines
12 KiB
HTML
Executable File
314 lines
12 KiB
HTML
Executable File
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<!--NewPage-->
|
|
<HTML>
|
|
<HEAD>
|
|
<!-- Generated by javadoc (build 1.5.0_13) on Sun Jul 13 13:05:42 EST 2008 -->
|
|
<TITLE>
|
|
CacheExtension (ehcache)
|
|
</TITLE>
|
|
|
|
<META NAME="keywords" CONTENT="net.sf.ehcache.extension.CacheExtension interface">
|
|
|
|
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
|
|
|
|
<SCRIPT type="text/javascript">
|
|
function windowTitle()
|
|
{
|
|
parent.document.title="CacheExtension (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> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/CacheExtension.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </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">
|
|
PREV CLASS
|
|
<A HREF="../../../../net/sf/ehcache/extension/CacheExtensionFactory.html" title="class in net.sf.ehcache.extension"><B>NEXT CLASS</B></A></FONT></TD>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../../index.html?net/sf/ehcache/extension/CacheExtension.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="CacheExtension.html" target="_top"><B>NO FRAMES</B></A>
|
|
<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: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
DETAIL: FIELD | CONSTR | <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.extension</FONT>
|
|
<BR>
|
|
Interface CacheExtension</H2>
|
|
<HR>
|
|
<DL>
|
|
<DT><PRE>public interface <B>CacheExtension</B></DL>
|
|
</PRE>
|
|
|
|
<P>
|
|
This is a general purpose mechanism to allow generic extensions to a Cache.
|
|
<p/>
|
|
CacheExtensions are tied into the Cache lifecycle. For that reason this interface has the lifecycle
|
|
methods.
|
|
<p/>
|
|
CacheExtensions are created using the CacheExtensionFactory which has a <code>createCacheCacheExtension()</code>
|
|
method which takes as a parameter a Cache and properties. It can thus call back into any public method on Cache,
|
|
including, of course, the load methods.
|
|
<p/>
|
|
CacheExtensions are suitable for timing services, where you want to create a timer to perform
|
|
cache operations. The other way of adding Cache behaviour is to decorate a cache. See
|
|
<A HREF="../../../../net/sf/ehcache/constructs/blocking/BlockingCache.html" title="class in net.sf.ehcache.constructs.blocking"><CODE>BlockingCache</CODE></A> for an example of how to do this.
|
|
<p/>
|
|
Because a CacheExtension holds a reference to a Cache, the CacheExtension can do things such as registering a
|
|
CacheEventListener or even a CacheManagerEventListener, all from within a CacheExtension, creating more
|
|
opportunities for customisation.
|
|
<P>
|
|
|
|
<P>
|
|
<DL>
|
|
<DT><B>Version:</B></DT>
|
|
<DD>$Id: CacheExtension.java 535 2007-08-12 01:32:14Z gregluck $</DD>
|
|
<DT><B>Author:</B></DT>
|
|
<DD><a href="mailto:gluck@gregluck.com">Greg Luck</a></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> <A HREF="../../../../net/sf/ehcache/extension/CacheExtension.html" title="interface in net.sf.ehcache.extension">CacheExtension</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/extension/CacheExtension.html#clone(net.sf.ehcache.Ehcache)">clone</A></B>(<A HREF="../../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache">Ehcache</A> cache)</CODE>
|
|
|
|
<BR>
|
|
Creates a clone of this extension.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/extension/CacheExtension.html#dispose()">dispose</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Providers may be doing all sorts of exotic things and need to be able to clean up on
|
|
dispose.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <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/extension/CacheExtension.html#getStatus()">getStatus</A></B>()</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/extension/CacheExtension.html#init()">init</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Notifies providers to initialise themselves.</TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<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="init()"><!-- --></A><H3>
|
|
init</H3>
|
|
<PRE>
|
|
void <B>init</B>()</PRE>
|
|
<DL>
|
|
<DD>Notifies providers to initialise themselves.
|
|
<p/>
|
|
This method is called during the Cache's initialise method after it has changed it's status to alive.
|
|
Cache operations are legal in this method.
|
|
<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="dispose()"><!-- --></A><H3>
|
|
dispose</H3>
|
|
<PRE>
|
|
void <B>dispose</B>()
|
|
throws <A HREF="../../../../net/sf/ehcache/CacheException.html" title="class in net.sf.ehcache">CacheException</A></PRE>
|
|
<DL>
|
|
<DD>Providers may be doing all sorts of exotic things and need to be able to clean up on
|
|
dispose.
|
|
<p/>
|
|
Cache operations are illegal when this method is called. The cache itself is partly disposed when this method
|
|
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="clone(net.sf.ehcache.Ehcache)"><!-- --></A><H3>
|
|
clone</H3>
|
|
<PRE>
|
|
<A HREF="../../../../net/sf/ehcache/extension/CacheExtension.html" title="interface in net.sf.ehcache.extension">CacheExtension</A> <B>clone</B>(<A HREF="../../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache">Ehcache</A> cache)
|
|
throws java.lang.CloneNotSupportedException</PRE>
|
|
<DL>
|
|
<DD>Creates a clone of this extension. This method will only be called by ehcache before a
|
|
cache is initialized.
|
|
<p/>
|
|
Implementations should throw CloneNotSupportedException if they do not support clone but that
|
|
will stop them from being used with defaultCache.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>a clone
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE>java.lang.CloneNotSupportedException</CODE> - if the extension could not be cloned.</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><DL>
|
|
|
|
<DT><B>Returns:</B><DD>the status of the extension</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> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/CacheExtension.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </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">
|
|
PREV CLASS
|
|
<A HREF="../../../../net/sf/ehcache/extension/CacheExtensionFactory.html" title="class in net.sf.ehcache.extension"><B>NEXT CLASS</B></A></FONT></TD>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../../index.html?net/sf/ehcache/extension/CacheExtension.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="CacheExtension.html" target="_top"><B>NO FRAMES</B></A>
|
|
<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: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="skip-navbar_bottom"></A>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
|
|
<HR>
|
|
|
|
</BODY>
|
|
</HTML>
|