mirror of https://github.com/apache/cloudstack.git
1190 lines
38 KiB
HTML
Executable File
1190 lines
38 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>
|
|
Element (ehcache)
|
|
</TITLE>
|
|
|
|
<META NAME="keywords" CONTENT="net.sf.ehcache.Element class">
|
|
|
|
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
|
|
|
|
<SCRIPT type="text/javascript">
|
|
function windowTitle()
|
|
{
|
|
parent.document.title="Element (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/Element.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">
|
|
<A HREF="../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache"><B>PREV CLASS</B></A>
|
|
<A HREF="../../../net/sf/ehcache/MimeTypeByteArray.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/Element.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="Element.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 | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <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 Element</H2>
|
|
<PRE>
|
|
java.lang.Object
|
|
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>net.sf.ehcache.Element</B>
|
|
</PRE>
|
|
<DL>
|
|
<DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable, java.lang.Cloneable</DD>
|
|
</DL>
|
|
<HR>
|
|
<DL>
|
|
<DT><PRE>public final class <B>Element</B><DT>extends java.lang.Object<DT>implements java.io.Serializable, java.lang.Cloneable</DL>
|
|
</PRE>
|
|
|
|
<P>
|
|
A Cache Element, consisting of a key, value and attributes.
|
|
<p/>
|
|
From ehcache-1.2, Elements can have keys and values that are Serializable or Objects. To preserve backward
|
|
compatibility, special accessor methods for Object keys and values are provided: <A HREF="../../../net/sf/ehcache/Element.html#getObjectKey()"><CODE>getObjectKey()</CODE></A> and
|
|
<A HREF="../../../net/sf/ehcache/Element.html#getObjectValue()"><CODE>getObjectValue()</CODE></A>. If placing Objects in ehcache, developers must use the new getObject... methods to
|
|
avoid CacheExceptions. The get... methods are reserved for Serializable keys and values.
|
|
<P>
|
|
|
|
<P>
|
|
<DL>
|
|
<DT><B>Version:</B></DT>
|
|
<DD>$Id: Element.java 704 2008-07-13 00:17:52Z gregluck $</DD>
|
|
<DT><B>Author:</B></DT>
|
|
<DD>Greg Luck</DD>
|
|
<DT><B>See Also:</B><DD><A HREF="../../../serialized-form.html#net.sf.ehcache.Element">Serialized Form</A></DL>
|
|
<HR>
|
|
|
|
<P>
|
|
|
|
<!-- ======== 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/Element.html#Element(java.lang.Object, java.lang.Object)">Element</A></B>(java.lang.Object key,
|
|
java.lang.Object value)</CODE>
|
|
|
|
<BR>
|
|
Constructor.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Element.html#Element(java.lang.Object, java.lang.Object, boolean, int, int)">Element</A></B>(java.lang.Object key,
|
|
java.lang.Object value,
|
|
boolean eternal,
|
|
int timeToIdleSeconds,
|
|
int timeToLiveSeconds)</CODE>
|
|
|
|
<BR>
|
|
Web Services specific constructor</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Element.html#Element(java.lang.Object, java.lang.Object, long)">Element</A></B>(java.lang.Object key,
|
|
java.lang.Object value,
|
|
long version)</CODE>
|
|
|
|
<BR>
|
|
A full constructor.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Element.html#Element(java.lang.Object, java.lang.Object, long, long, long, long, long, long)">Element</A></B>(java.lang.Object key,
|
|
java.lang.Object value,
|
|
long version,
|
|
long creationTime,
|
|
long lastAccessTime,
|
|
long nextToLastAccessTime,
|
|
long lastUpdateTime,
|
|
long hitCount)</CODE>
|
|
|
|
<BR>
|
|
Constructor.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Element.html#Element(java.io.Serializable, java.io.Serializable)">Element</A></B>(java.io.Serializable key,
|
|
java.io.Serializable value)</CODE>
|
|
|
|
<BR>
|
|
Constructor.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Element.html#Element(java.io.Serializable, java.io.Serializable, long)">Element</A></B>(java.io.Serializable key,
|
|
java.io.Serializable value,
|
|
long version)</CODE>
|
|
|
|
<BR>
|
|
A full constructor.</TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<!-- ========== 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> java.lang.Object</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Element.html#clone()">clone</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Clones an Element.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Element.html#equals(java.lang.Object)">equals</A></B>(java.lang.Object object)</CODE>
|
|
|
|
<BR>
|
|
Equals comparison with another element, based on the key.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> long</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Element.html#getCreationTime()">getCreationTime</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Gets the creationTime attribute of the ElementAttributes object.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> long</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Element.html#getExpirationTime()">getExpirationTime</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Returns the expiration time based on time to live.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> long</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Element.html#getHitCount()">getHitCount</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Gets the hit count on this element.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> java.io.Serializable</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Element.html#getKey()">getKey</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Gets the key attribute of the Element object.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> long</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Element.html#getLastAccessTime()">getLastAccessTime</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Gets the last access time.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> long</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Element.html#getLastUpdateTime()">getLastUpdateTime</A></B>()</CODE>
|
|
|
|
<BR>
|
|
If there is an Element in the Cache and it is replaced with a new Element for the same key,
|
|
then both the version number and lastUpdateTime should be updated to reflect that.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> long</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Element.html#getNextToLastAccessTime()">getNextToLastAccessTime</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Gets the next to last access time.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> java.lang.Object</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Element.html#getObjectKey()">getObjectKey</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Gets the key attribute of the Element object.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> java.lang.Object</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Element.html#getObjectValue()">getObjectValue</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Gets the value attribute of the Element object as an Object.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> long</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Element.html#getSerializedSize()">getSerializedSize</A></B>()</CODE>
|
|
|
|
<BR>
|
|
The size of this object in serialized form.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Element.html#getTimeToIdle()">getTimeToIdle</A></B>()</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Element.html#getTimeToLive()">getTimeToLive</A></B>()</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> java.io.Serializable</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Element.html#getValue()">getValue</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Gets the value attribute of the Element object.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> long</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Element.html#getVersion()">getVersion</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Gets the version attribute of the ElementAttributes object.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Element.html#hashCode()">hashCode</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Gets the hashcode, based on the key.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Element.html#isEternal()">isEternal</A></B>()</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Element.html#isExpired()">isExpired</A></B>()</CODE>
|
|
|
|
<BR>
|
|
An element is expired if the expiration time as given by <A HREF="../../../net/sf/ehcache/Element.html#getExpirationTime()"><CODE>getExpirationTime()</CODE></A> is in the past.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Element.html#isKeySerializable()">isKeySerializable</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Whether the element's key may be Serialized.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Element.html#isLifespanSet()">isLifespanSet</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Whether any combination of eternal, TTL or TTI has been set.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Element.html#isSerializable()">isSerializable</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Whether the element may be Serialized.</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/Element.html#resetAccessStatistics()">resetAccessStatistics</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Resets the hit count to 0 and the last access time to 0.</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/Element.html#setCreateTime()">setCreateTime</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Sets the creationTime attribute of the ElementAttributes object.</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/Element.html#setEternal(boolean)">setEternal</A></B>(boolean eternal)</CODE>
|
|
|
|
<BR>
|
|
Sets whether the element is eternal.</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/Element.html#setTimeToIdle(int)">setTimeToIdle</A></B>(int timeToIdleSeconds)</CODE>
|
|
|
|
<BR>
|
|
Sets time to idle</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/Element.html#setTimeToLive(int)">setTimeToLive</A></B>(int timeToLiveSeconds)</CODE>
|
|
|
|
<BR>
|
|
Sets time to Live</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/Element.html#setVersion(long)">setVersion</A></B>(long version)</CODE>
|
|
|
|
<BR>
|
|
Sets the version attribute of the ElementAttributes object.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> java.lang.String</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Element.html#toString()">toString</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Returns a <CODE>String</CODE> representation of the <A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache"><CODE>Element</CODE></A>.</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/Element.html#updateAccessStatistics()">updateAccessStatistics</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Sets the last access time to now.</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/Element.html#updateUpdateStatistics()">updateUpdateStatistics</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Sets the last access time to now.</TD>
|
|
</TR>
|
|
</TABLE>
|
|
<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>finalize, getClass, notify, notifyAll, wait, wait, wait</CODE></TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<P>
|
|
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
|
|
<A NAME="constructor_detail"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
|
<B>Constructor Detail</B></FONT></TH>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<A NAME="Element(java.io.Serializable, java.io.Serializable, long)"><!-- --></A><H3>
|
|
Element</H3>
|
|
<PRE>
|
|
public <B>Element</B>(java.io.Serializable key,
|
|
java.io.Serializable value,
|
|
long version)</PRE>
|
|
<DL>
|
|
<DD>A full constructor.
|
|
<p/>
|
|
Creation time is set to the current time. Last Access Time and Previous To Last Access Time
|
|
are not set.
|
|
<P>
|
|
<DL>
|
|
<DT><B>Since:</B></DT>
|
|
<DD>.4</DD>
|
|
</DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="Element(java.lang.Object, java.lang.Object, long)"><!-- --></A><H3>
|
|
Element</H3>
|
|
<PRE>
|
|
public <B>Element</B>(java.lang.Object key,
|
|
java.lang.Object value,
|
|
long version)</PRE>
|
|
<DL>
|
|
<DD>A full constructor.
|
|
<p/>
|
|
Creation time is set to the current time. Last Access Time and Previous To Last Access Time
|
|
are not set.
|
|
<P>
|
|
<DL>
|
|
<DT><B>Since:</B></DT>
|
|
<DD>1.2</DD>
|
|
</DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="Element(java.lang.Object, java.lang.Object, long, long, long, long, long, long)"><!-- --></A><H3>
|
|
Element</H3>
|
|
<PRE>
|
|
public <B>Element</B>(java.lang.Object key,
|
|
java.lang.Object value,
|
|
long version,
|
|
long creationTime,
|
|
long lastAccessTime,
|
|
long nextToLastAccessTime,
|
|
long lastUpdateTime,
|
|
long hitCount)</PRE>
|
|
<DL>
|
|
<DD>Constructor.
|
|
<P>
|
|
<DL>
|
|
<DT><B>Since:</B></DT>
|
|
<DD>1.3</DD>
|
|
</DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="Element(java.lang.Object, java.lang.Object, boolean, int, int)"><!-- --></A><H3>
|
|
Element</H3>
|
|
<PRE>
|
|
public <B>Element</B>(java.lang.Object key,
|
|
java.lang.Object value,
|
|
boolean eternal,
|
|
int timeToIdleSeconds,
|
|
int timeToLiveSeconds)</PRE>
|
|
<DL>
|
|
<DD>Web Services specific constructor
|
|
<P>
|
|
<DL>
|
|
<DT><B>Parameters:</B><DD><CODE>key</CODE> - <DD><CODE>value</CODE> - <DD><CODE>eternal</CODE> - <DD><CODE>timeToIdleSeconds</CODE> - <DD><CODE>timeToLiveSeconds</CODE> - </DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="Element(java.io.Serializable, java.io.Serializable)"><!-- --></A><H3>
|
|
Element</H3>
|
|
<PRE>
|
|
public <B>Element</B>(java.io.Serializable key,
|
|
java.io.Serializable value)</PRE>
|
|
<DL>
|
|
<DD>Constructor.
|
|
<P>
|
|
<DL>
|
|
<DT><B>Parameters:</B><DD><CODE>key</CODE> - <DD><CODE>value</CODE> - </DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="Element(java.lang.Object, java.lang.Object)"><!-- --></A><H3>
|
|
Element</H3>
|
|
<PRE>
|
|
public <B>Element</B>(java.lang.Object key,
|
|
java.lang.Object value)</PRE>
|
|
<DL>
|
|
<DD>Constructor.
|
|
<P>
|
|
<DL>
|
|
<DT><B>Parameters:</B><DD><CODE>key</CODE> - <DD><CODE>value</CODE> - <DT><B>Since:</B></DT>
|
|
<DD>1.2</DD>
|
|
</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="getKey()"><!-- --></A><H3>
|
|
getKey</H3>
|
|
<PRE>
|
|
public final java.io.Serializable <B>getKey</B>()</PRE>
|
|
<DL>
|
|
<DD>Gets the key attribute of the Element object.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>The key value. If the key is not Serializable, null is returned and an info log message emitted<DT><B>See Also:</B><DD><A HREF="../../../net/sf/ehcache/Element.html#getObjectKey()"><CODE>getObjectKey()</CODE></A></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getObjectKey()"><!-- --></A><H3>
|
|
getObjectKey</H3>
|
|
<PRE>
|
|
public final java.lang.Object <B>getObjectKey</B>()</PRE>
|
|
<DL>
|
|
<DD>Gets the key attribute of the Element object.
|
|
<p/>
|
|
This method is provided for those wishing to use ehcache as a memory only cache
|
|
and enables retrieval of non-Serializable values from elements.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>The key as an Object. i.e no restriction is placed on it<DT><B>See Also:</B><DD><A HREF="../../../net/sf/ehcache/Element.html#getKey()"><CODE>getKey()</CODE></A></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getValue()"><!-- --></A><H3>
|
|
getValue</H3>
|
|
<PRE>
|
|
public final java.io.Serializable <B>getValue</B>()</PRE>
|
|
<DL>
|
|
<DD>Gets the value attribute of the Element object.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>The value which must be Serializable. If not use <A HREF="../../../net/sf/ehcache/Element.html#getObjectValue()"><CODE>getObjectValue()</CODE></A>. If the value is not Serializable, null is returned and an info log message emitted<DT><B>See Also:</B><DD><A HREF="../../../net/sf/ehcache/Element.html#getObjectValue()"><CODE>getObjectValue()</CODE></A></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getObjectValue()"><!-- --></A><H3>
|
|
getObjectValue</H3>
|
|
<PRE>
|
|
public final java.lang.Object <B>getObjectValue</B>()</PRE>
|
|
<DL>
|
|
<DD>Gets the value attribute of the Element object as an Object.
|
|
<p/>
|
|
This method is provided for those wishing to use ehcache as a memory only cache
|
|
and enables retrieval of non-Serializable values from elements.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>The value as an Object. i.e no restriction is placed on it<DT><B>Since:</B></DT>
|
|
<DD>1.2</DD>
|
|
<DT><B>See Also:</B><DD><A HREF="../../../net/sf/ehcache/Element.html#getValue()"><CODE>getValue()</CODE></A></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="equals(java.lang.Object)"><!-- --></A><H3>
|
|
equals</H3>
|
|
<PRE>
|
|
public final boolean <B>equals</B>(java.lang.Object object)</PRE>
|
|
<DL>
|
|
<DD>Equals comparison with another element, based on the key.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Overrides:</B><DD><CODE>equals</CODE> in class <CODE>java.lang.Object</CODE></DL>
|
|
</DD>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="setTimeToLive(int)"><!-- --></A><H3>
|
|
setTimeToLive</H3>
|
|
<PRE>
|
|
public void <B>setTimeToLive</B>(int timeToLiveSeconds)</PRE>
|
|
<DL>
|
|
<DD>Sets time to Live
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>timeToLiveSeconds</CODE> - the number of seconds to live</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="setTimeToIdle(int)"><!-- --></A><H3>
|
|
setTimeToIdle</H3>
|
|
<PRE>
|
|
public void <B>setTimeToIdle</B>(int timeToIdleSeconds)</PRE>
|
|
<DL>
|
|
<DD>Sets time to idle
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>timeToIdleSeconds</CODE> - the number of seconds to idle</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="hashCode()"><!-- --></A><H3>
|
|
hashCode</H3>
|
|
<PRE>
|
|
public final int <B>hashCode</B>()</PRE>
|
|
<DL>
|
|
<DD>Gets the hashcode, based on the key.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Overrides:</B><DD><CODE>hashCode</CODE> in class <CODE>java.lang.Object</CODE></DL>
|
|
</DD>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="setVersion(long)"><!-- --></A><H3>
|
|
setVersion</H3>
|
|
<PRE>
|
|
public final void <B>setVersion</B>(long version)</PRE>
|
|
<DL>
|
|
<DD>Sets the version attribute of the ElementAttributes object.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>version</CODE> - The new version value</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getCreationTime()"><!-- --></A><H3>
|
|
getCreationTime</H3>
|
|
<PRE>
|
|
public final long <B>getCreationTime</B>()</PRE>
|
|
<DL>
|
|
<DD>Gets the creationTime attribute of the ElementAttributes object.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>The creationTime value</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="setCreateTime()"><!-- --></A><H3>
|
|
setCreateTime</H3>
|
|
<PRE>
|
|
public final void <B>setCreateTime</B>()</PRE>
|
|
<DL>
|
|
<DD>Sets the creationTime attribute of the ElementAttributes object.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getVersion()"><!-- --></A><H3>
|
|
getVersion</H3>
|
|
<PRE>
|
|
public final long <B>getVersion</B>()</PRE>
|
|
<DL>
|
|
<DD>Gets the version attribute of the ElementAttributes object.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>The version value</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getLastAccessTime()"><!-- --></A><H3>
|
|
getLastAccessTime</H3>
|
|
<PRE>
|
|
public final long <B>getLastAccessTime</B>()</PRE>
|
|
<DL>
|
|
<DD>Gets the last access time.
|
|
Access means a get. So a newly created <A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache"><CODE>Element</CODE></A>
|
|
will have a last access time equal to its create time.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getNextToLastAccessTime()"><!-- --></A><H3>
|
|
getNextToLastAccessTime</H3>
|
|
<PRE>
|
|
public final long <B>getNextToLastAccessTime</B>()</PRE>
|
|
<DL>
|
|
<DD>Gets the next to last access time.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>See Also:</B><DD><A HREF="../../../net/sf/ehcache/Element.html#getLastAccessTime()"><CODE>getLastAccessTime()</CODE></A></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getHitCount()"><!-- --></A><H3>
|
|
getHitCount</H3>
|
|
<PRE>
|
|
public final long <B>getHitCount</B>()</PRE>
|
|
<DL>
|
|
<DD>Gets the hit count on this element.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="resetAccessStatistics()"><!-- --></A><H3>
|
|
resetAccessStatistics</H3>
|
|
<PRE>
|
|
public final void <B>resetAccessStatistics</B>()</PRE>
|
|
<DL>
|
|
<DD>Resets the hit count to 0 and the last access time to 0.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="updateAccessStatistics()"><!-- --></A><H3>
|
|
updateAccessStatistics</H3>
|
|
<PRE>
|
|
public final void <B>updateAccessStatistics</B>()</PRE>
|
|
<DL>
|
|
<DD>Sets the last access time to now.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="updateUpdateStatistics()"><!-- --></A><H3>
|
|
updateUpdateStatistics</H3>
|
|
<PRE>
|
|
public final void <B>updateUpdateStatistics</B>()</PRE>
|
|
<DL>
|
|
<DD>Sets the last access time to now.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="toString()"><!-- --></A><H3>
|
|
toString</H3>
|
|
<PRE>
|
|
public final java.lang.String <B>toString</B>()</PRE>
|
|
<DL>
|
|
<DD>Returns a <CODE>String</CODE> representation of the <A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache"><CODE>Element</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="clone()"><!-- --></A><H3>
|
|
clone</H3>
|
|
<PRE>
|
|
public final java.lang.Object <B>clone</B>()
|
|
throws java.lang.CloneNotSupportedException</PRE>
|
|
<DL>
|
|
<DD>Clones an Element. A completely new object is created, with no common references with the
|
|
existing one.
|
|
<p/>
|
|
This method will not work unless the Object is Serializable
|
|
<p/>
|
|
Warning: This can be very slow on large object graphs. If you use this method
|
|
you should write a performance test to verify suitability.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Overrides:</B><DD><CODE>clone</CODE> in class <CODE>java.lang.Object</CODE></DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>a new <A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache"><CODE>Element</CODE></A>, with exactly the same field values as the one it was cloned from.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE>java.lang.CloneNotSupportedException</CODE></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getSerializedSize()"><!-- --></A><H3>
|
|
getSerializedSize</H3>
|
|
<PRE>
|
|
public final long <B>getSerializedSize</B>()</PRE>
|
|
<DL>
|
|
<DD>The size of this object in serialized form. This is not the same
|
|
thing as the memory size, which is JVM dependent. Relative values should be meaningful,
|
|
however.
|
|
<p/>
|
|
Warning: This method can be <b>very slow</b> for values which contain large object graphs.
|
|
<p/>
|
|
If the key or value of the Element is not Serializable, an error will be logged and 0 will be returned.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>The serialized size in bytes</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="isSerializable()"><!-- --></A><H3>
|
|
isSerializable</H3>
|
|
<PRE>
|
|
public final boolean <B>isSerializable</B>()</PRE>
|
|
<DL>
|
|
<DD>Whether the element may be Serialized.
|
|
<p/>
|
|
While Element implements Serializable, it is possible to create non Serializable elements
|
|
for use in MemoryStores. This method checks that an instance of Element really is Serializable
|
|
and will not throw a NonSerializableException if Serialized.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>true if the element is Serializable<DT><B>Since:</B></DT>
|
|
<DD>1.2</DD>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="isKeySerializable()"><!-- --></A><H3>
|
|
isKeySerializable</H3>
|
|
<PRE>
|
|
public final boolean <B>isKeySerializable</B>()</PRE>
|
|
<DL>
|
|
<DD>Whether the element's key may be Serialized.
|
|
<p/>
|
|
While Element implements Serializable, it is possible to create non Serializable elements and/or
|
|
non Serializable keys for use in MemoryStores.
|
|
<p/>
|
|
This method checks that an instance of an Element's key really is Serializable
|
|
and will not throw a NonSerializableException if Serialized.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>true if the element's key is Serializable<DT><B>Since:</B></DT>
|
|
<DD>1.2</DD>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getLastUpdateTime()"><!-- --></A><H3>
|
|
getLastUpdateTime</H3>
|
|
<PRE>
|
|
public long <B>getLastUpdateTime</B>()</PRE>
|
|
<DL>
|
|
<DD>If there is an Element in the Cache and it is replaced with a new Element for the same key,
|
|
then both the version number and lastUpdateTime should be updated to reflect that. The creation time
|
|
will be the creation time of the new Element, not the original one, so that TTL concepts still work.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>the time when the last update occured. If this is the original Element, the time will be null</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="isExpired()"><!-- --></A><H3>
|
|
isExpired</H3>
|
|
<PRE>
|
|
public boolean <B>isExpired</B>()</PRE>
|
|
<DL>
|
|
<DD>An element is expired if the expiration time as given by <A HREF="../../../net/sf/ehcache/Element.html#getExpirationTime()"><CODE>getExpirationTime()</CODE></A> is in the past.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>true if the Element is expired, otherwise false. If no lifespan has been set for the Element it is
|
|
considered not able to expire.<DT><B>See Also:</B><DD><A HREF="../../../net/sf/ehcache/Element.html#getExpirationTime()"><CODE>getExpirationTime()</CODE></A></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getExpirationTime()"><!-- --></A><H3>
|
|
getExpirationTime</H3>
|
|
<PRE>
|
|
public long <B>getExpirationTime</B>()</PRE>
|
|
<DL>
|
|
<DD>Returns the expiration time based on time to live. If this element also has a time to idle setting, the expiry
|
|
time will vary depending on whether the element is accessed.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>the time to expiration</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="isEternal()"><!-- --></A><H3>
|
|
isEternal</H3>
|
|
<PRE>
|
|
public boolean <B>isEternal</B>()</PRE>
|
|
<DL>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>true if the element is eternal</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="setEternal(boolean)"><!-- --></A><H3>
|
|
setEternal</H3>
|
|
<PRE>
|
|
public void <B>setEternal</B>(boolean eternal)</PRE>
|
|
<DL>
|
|
<DD>Sets whether the element is eternal.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>eternal</CODE> - </DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="isLifespanSet()"><!-- --></A><H3>
|
|
isLifespanSet</H3>
|
|
<PRE>
|
|
public boolean <B>isLifespanSet</B>()</PRE>
|
|
<DL>
|
|
<DD>Whether any combination of eternal, TTL or TTI has been set.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>true if set.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getTimeToLive()"><!-- --></A><H3>
|
|
getTimeToLive</H3>
|
|
<PRE>
|
|
public int <B>getTimeToLive</B>()</PRE>
|
|
<DL>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>the time to live, in seconds</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getTimeToIdle()"><!-- --></A><H3>
|
|
getTimeToIdle</H3>
|
|
<PRE>
|
|
public int <B>getTimeToIdle</B>()</PRE>
|
|
<DL>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>the time to idle, in seconds</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/Element.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">
|
|
<A HREF="../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache"><B>PREV CLASS</B></A>
|
|
<A HREF="../../../net/sf/ehcache/MimeTypeByteArray.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/Element.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="Element.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 | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="skip-navbar_bottom"></A>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
|
|
<HR>
|
|
|
|
</BODY>
|
|
</HTML>
|