- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
- <!--NewPage-->
- <HTML>
- <HEAD>
- <!-- Generated by javadoc on Mon Aug 05 13:17:01 EDT 2002 -->
- <TITLE>
- Perforce API: Interface Cacheable
- </TITLE>
- <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
- </HEAD>
- <BODY BGCOLOR="white">
- <!-- ========== START OF NAVBAR ========== -->
- <A NAME="navbar_top"><!-- --></A>
- <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
- <TR>
- <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
- <A NAME="navbar_top_firstrow"><!-- --></A>
- <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
- <TR ALIGN="center" VALIGN="top">
- <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/Cacheable.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="../../../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 target="_top" href="http://www.perforce.com/"><img alt="Perforce" border="0" height="44" width="151" src="doc-files/perforce_logo.gif"></a></EM>
- </TD>
- </TR>
- <TR>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- PREV CLASS
- NEXT CLASS</FONT></TD>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>
- <A HREF="Cacheable.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
- </TR>
- <TR>
- <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
- SUMMARY: INNER | 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>
- <!-- =========== END OF NAVBAR =========== -->
- <HR>
- <!-- ======== START OF CLASS DATA ======== -->
- <H2>
- <FONT SIZE="-1">
- com.perforce.api</FONT>
- <BR>
- Interface Cacheable</H2>
- <DL>
- <DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../com/perforce/api/SourceControlObject.html">SourceControlObject</A></DD>
- </DL>
- <HR>
- <DL>
- <DT>public interface <B>Cacheable</B></DL>
- <P>
- An interface that indicates the implementing class can be cached for some
- period of time. Implementing classes will be stored in a
- <code>HashDecay</code> instance. Each instantiating class must create its
- own <code>HashDecay</code> instance and return a reference to it through
- the <code>getCache</code> method.
- The update time is what is used by the <code>HasDecay</code> to determine
- when an object will decay and be discarded.
- <P>
- <DL>
- <DT><B>Version: </B><DD>$Date: 2002/08/05 $ $Revision: #6 $</DD>
- <DT><B>Author: </B><DD><a href="mailto:david@markley.cc">David Markley</a></DD>
- <DT><B>See Also: </B><DD><A HREF="../../../com/perforce/api/HashDecay.html"><CODE>HashDecay</CODE></A></DL>
- <HR>
- <P>
- <!-- ======== INNER CLASS SUMMARY ======== -->
- <!-- =========== FIELD SUMMARY =========== -->
- <!-- ======== CONSTRUCTOR SUMMARY ======== -->
- <!-- ========== METHOD SUMMARY =========== -->
- <A NAME="method_summary"><!-- --></A>
- <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
- <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
- <TD COLSPAN=2><FONT SIZE="+2">
- <B>Method Summary</B></FONT></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="../../../com/perforce/api/Cacheable.html#clearCache()">clearCache</A></B>()</CODE>
- <BR>
- Removes any cached objects.</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="../../../com/perforce/api/Cacheable.html#commit()">commit</A></B>()</CODE>
- <BR>
- Stores this object back into Perforce, creating it if it
- didn't already exist.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE> <A HREF="../../../com/perforce/api/HashDecay.html">HashDecay</A></CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/perforce/api/Cacheable.html#getCache()">getCache</A></B>()</CODE>
- <BR>
- Returns the HashDecay instance for this class</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="../../../com/perforce/api/Cacheable.html#getSyncTime()">getSyncTime</A></B>()</CODE>
- <BR>
- Returns the time, in milliseconds, that this object was synchronized.</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="../../../com/perforce/api/Cacheable.html#getUpdateTime()">getUpdateTime</A></B>()</CODE>
- <BR>
- Returns the time, in milliseconds, for this object's last update.</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="../../../com/perforce/api/Cacheable.html#inSync()">inSync</A></B>()</CODE>
- <BR>
- Marks this object as being in in sync or valid.</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="../../../com/perforce/api/Cacheable.html#invalidate()">invalidate</A></B>()</CODE>
- <BR>
- Invalidates this object.</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="../../../com/perforce/api/Cacheable.html#outOfSync(long)">outOfSync</A></B>(long threshold)</CODE>
- <BR>
- Tests this object to see if it is out of sync.</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="../../../com/perforce/api/Cacheable.html#refreshUpdateTime()">refreshUpdateTime</A></B>()</CODE>
- <BR>
- Sets the update time for this object to the current time.</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="../../../com/perforce/api/Cacheable.html#sync()">sync</A></B>()</CODE>
- <BR>
- Brings this object back into sync with Perforce.</TD>
- </TR>
- </TABLE>
-
- <P>
- <!-- ============ FIELD DETAIL =========== -->
- <!-- ========= CONSTRUCTOR DETAIL ======== -->
- <!-- ============ METHOD DETAIL ========== -->
- <A NAME="method_detail"><!-- --></A>
- <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
- <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
- <TD COLSPAN=1><FONT SIZE="+2">
- <B>Method Detail</B></FONT></TD>
- </TR>
- </TABLE>
- <A NAME="clearCache()"><!-- --></A><H3>
- clearCache</H3>
- <PRE>
- public void <B>clearCache</B>()</PRE>
- <DL>
- <DD>Removes any cached objects.</DL>
- <HR>
- <A NAME="commit()"><!-- --></A><H3>
- commit</H3>
- <PRE>
- public void <B>commit</B>()
- throws <A HREF="../../../com/perforce/api/CommitException.html">CommitException</A></PRE>
- <DL>
- <DD>Stores this object back into Perforce, creating it if it
- didn't already exist.</DL>
- <HR>
- <A NAME="getCache()"><!-- --></A><H3>
- getCache</H3>
- <PRE>
- public <A HREF="../../../com/perforce/api/HashDecay.html">HashDecay</A> <B>getCache</B>()</PRE>
- <DL>
- <DD>Returns the HashDecay instance for this class</DL>
- <HR>
- <A NAME="getSyncTime()"><!-- --></A><H3>
- getSyncTime</H3>
- <PRE>
- public long <B>getSyncTime</B>()</PRE>
- <DL>
- <DD>Returns the time, in milliseconds, that this object was synchronized.</DL>
- <HR>
- <A NAME="getUpdateTime()"><!-- --></A><H3>
- getUpdateTime</H3>
- <PRE>
- public long <B>getUpdateTime</B>()</PRE>
- <DL>
- <DD>Returns the time, in milliseconds, for this object's last update.</DL>
- <HR>
- <A NAME="inSync()"><!-- --></A><H3>
- inSync</H3>
- <PRE>
- public void <B>inSync</B>()</PRE>
- <DL>
- <DD>Marks this object as being in in sync or valid.</DL>
- <HR>
- <A NAME="invalidate()"><!-- --></A><H3>
- invalidate</H3>
- <PRE>
- public void <B>invalidate</B>()</PRE>
- <DL>
- <DD>Invalidates this object.</DL>
- <HR>
- <A NAME="outOfSync(long)"><!-- --></A><H3>
- outOfSync</H3>
- <PRE>
- public boolean <B>outOfSync</B>(long threshold)</PRE>
- <DL>
- <DD>Tests this object to see if it is out of sync. Checks to see if the
- expiration time is within the specified number of milliseconds.<DD><DL>
- <DT><B>Parameters:</B><DD><CODE>threshold</CODE> - Number of milliseconds.<DT><B>Returns:</B><DD>True if the object will be out of sync within the threshold.</DL>
- </DD>
- </DL>
- <HR>
- <A NAME="refreshUpdateTime()"><!-- --></A><H3>
- refreshUpdateTime</H3>
- <PRE>
- public void <B>refreshUpdateTime</B>()</PRE>
- <DL>
- <DD>Sets the update time for this object to the current time.</DL>
- <HR>
- <A NAME="sync()"><!-- --></A><H3>
- sync</H3>
- <PRE>
- public void <B>sync</B>()
- throws <A HREF="../../../com/perforce/api/PerforceException.html">PerforceException</A></PRE>
- <DL>
- <DD>Brings this object back into sync with Perforce. This also sets the
- sets the update and sync time for this object.</DL>
- <!-- ========= END OF CLASS DATA ========= -->
- <HR>
- <!-- ========== START OF NAVBAR ========== -->
- <A NAME="navbar_bottom"><!-- --></A>
- <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
- <TR>
- <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
- <A NAME="navbar_bottom_firstrow"><!-- --></A>
- <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
- <TR ALIGN="center" VALIGN="top">
- <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/Cacheable.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="../../../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 target="_top" href="http://www.perforce.com/"><img alt="Perforce" border="0" height="44" width="151" src="doc-files/perforce_logo.gif"></a></EM>
- </TD>
- </TR>
- <TR>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- PREV CLASS
- NEXT CLASS</FONT></TD>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>
- <A HREF="Cacheable.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
- </TR>
- <TR>
- <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
- SUMMARY: INNER | 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>
- <!-- =========== END OF NAVBAR =========== -->
- <HR>
- <i><a href="doc-files/LICENSE.TXT">Copyright</a> © 2001, Perforce Software, All rights reserved.</i>
- </BODY>
- </HTML>
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#6 | 2001 | David Markley | Updated package documentation. | 23 years ago | |
#5 | 1387 | David Markley | Added the ability to reopen files, add them to changelists, and updated the documentation... to reflect these changes. « |
23 years ago | |
#4 | 1360 | David Markley | Updated Env class. | 23 years ago | |
#3 | 1332 | David Markley | Added more example code. Added the Counter class. Corrected the filelog methods for the... FileEntry class. « |
23 years ago | |
#2 | 1037 | David Markley | Updated the documentation. | 23 years ago | |
#1 | 1020 | David Markley |
Added Perforce Java API documentation. This is generated using JavaDoc. |
23 years ago |