<!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) on Tue Nov 06 17:41:05 CST 2007 --> | |
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> | |
<TITLE> | |
TimeUnit (OpenJPA 1.0.1 API) | |
</TITLE> | |
<META NAME="keywords" CONTENT="org.apache.openjpa.lib.util.concurrent.TimeUnit class"> | |
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style"> | |
<SCRIPT type="text/javascript"> | |
function windowTitle() | |
{ | |
parent.document.title="TimeUnit (OpenJPA 1.0.1 API)"; | |
} | |
</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"> <A HREF="#main"><FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/TimeUnit.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> | |
</EM> | |
</TD> | |
</TR> | |
<TR> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/ReentrantLock.html" title="class in org.apache.openjpa.lib.util.concurrent"><B>PREV CLASS</B></A> | |
<A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/Utils.html" title="class in org.apache.openjpa.lib.util.concurrent"><B>NEXT CLASS</B></A></FONT></TD> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../../../index.html?org/apache/openjpa/lib/util/concurrent/TimeUnit.html" target="_top"><B>FRAMES</B></A> | |
<A HREF="TimeUnit.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 | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> | |
</TR> | |
</TABLE> | |
<A NAME="skip-navbar_top"></A> | |
<!-- ========= END OF TOP NAVBAR ========= --> | |
<HR> | |
<A NAME="main"></A> | |
<!-- ======== START OF CLASS DATA ======== --> | |
<H2> | |
<FONT SIZE="-1"> | |
org.apache.openjpa.lib.util.concurrent</FONT> | |
<BR> | |
Class TimeUnit</H2> | |
<PRE> | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A> | |
<IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.openjpa.lib.util.concurrent.TimeUnit</B> | |
</PRE> | |
<DL> | |
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Serializable.html" title="class or interface in java.io">Serializable</A></DD> | |
</DL> | |
<HR> | |
<DL> | |
<DT><PRE>public abstract class <B>TimeUnit</B><DT>extends <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A><DT>implements <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Serializable.html" title="class or interface in java.io">Serializable</A></DL> | |
</PRE> | |
<P> | |
A <tt>TimeUnit</tt> represents time durations at a given unit of | |
granularity and provides utility methods to convert across units, | |
and to perform timing and delay operations in these units. A | |
<tt>TimeUnit</tt> does not maintain time information, but only | |
helps organize and use time representations that may be maintained | |
separately across various contexts. A nanosecond is defined as one | |
thousandth of a microsecond, a microsecond as one thousandth of a | |
millisecond, a millisecond as one thousandth of a second, a minute | |
as sixty seconds, an hour as sixty minutes, and a day as twenty four hours. | |
A <tt>TimeUnit</tt> is mainly used to inform time-based methods | |
how a given timing parameter should be interpreted. For example, | |
the following code will timeout in 50 milliseconds if the <CODE>lock</CODE> is not | |
available: | |
<pre> Lock lock = ...; if ( lock.tryLock(50L, TimeUnit.MILLISECONDS) ) ... | |
</pre> while this code will timeout in 50 seconds: | |
<pre> Lock lock = ...; if ( lock.tryLock(50L, TimeUnit.SECONDS) ) ... | |
</pre> Note however, that there is no guarantee that a particular timeout | |
implementation will be able to notice the passage of time at the | |
same granularity as the given <tt>TimeUnit</tt>. | |
<P> | |
<P> | |
<DL> | |
<DT><B>Since:</B></DT> | |
<DD>1.5</DD> | |
<DT><B>Author:</B></DT> | |
<DD>Doug Lea</DD> | |
<DT><B>See Also:</B><DD><A HREF="../../../../../../serialized-form.html#org.apache.openjpa.lib.util.concurrent.TimeUnit">Serialized Form</A></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 <A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html" title="class in org.apache.openjpa.lib.util.concurrent">TimeUnit</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html#DAYS">DAYS</A></B></CODE> | |
<BR> | |
</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static <A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html" title="class in org.apache.openjpa.lib.util.concurrent">TimeUnit</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html#HOURS">HOURS</A></B></CODE> | |
<BR> | |
</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static <A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html" title="class in org.apache.openjpa.lib.util.concurrent">TimeUnit</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html#MICROSECONDS">MICROSECONDS</A></B></CODE> | |
<BR> | |
</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static <A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html" title="class in org.apache.openjpa.lib.util.concurrent">TimeUnit</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html#MILLISECONDS">MILLISECONDS</A></B></CODE> | |
<BR> | |
</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static <A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html" title="class in org.apache.openjpa.lib.util.concurrent">TimeUnit</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html#MINUTES">MINUTES</A></B></CODE> | |
<BR> | |
</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static <A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html" title="class in org.apache.openjpa.lib.util.concurrent">TimeUnit</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html#NANOSECONDS">NANOSECONDS</A></B></CODE> | |
<BR> | |
</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static <A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html" title="class in org.apache.openjpa.lib.util.concurrent">TimeUnit</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html#SECONDS">SECONDS</A></B></CODE> | |
<BR> | |
</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>abstract long</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html#convert(long, org.apache.openjpa.lib.util.concurrent.TimeUnit)">convert</A></B>(long sourceDuration, | |
<A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html" title="class in org.apache.openjpa.lib.util.concurrent">TimeUnit</A> sourceUnit)</CODE> | |
<BR> | |
Convert the given time duration in the given unit to this | |
unit.</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="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html#sleep(long)">sleep</A></B>(long timeout)</CODE> | |
<BR> | |
Performs a <tt>Thread.sleep</tt> using this unit.</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="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html#timedJoin(java.lang.Thread, long)">timedJoin</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Thread.html" title="class or interface in java.lang">Thread</A> thread, | |
long timeout)</CODE> | |
<BR> | |
Performs a timed <tt>Thread.join</tt> using this time unit.</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="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html#timedWait(java.lang.Object, long)">timedWait</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> obj, | |
long timeout)</CODE> | |
<BR> | |
Performs a timed <tt>Object.wait</tt> using this time unit.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>abstract long</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html#toDays(long)">toDays</A></B>(long duration)</CODE> | |
<BR> | |
Equivalent to <tt>DAYS.convert(duration, this)</tt>.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>abstract long</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html#toHours(long)">toHours</A></B>(long duration)</CODE> | |
<BR> | |
Equivalent to <tt>HOURS.convert(duration, this)</tt>.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>abstract long</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html#toMicros(long)">toMicros</A></B>(long duration)</CODE> | |
<BR> | |
Equivalent to <tt>MICROSECONDS.convert(duration, this)</tt>.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>abstract long</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html#toMillis(long)">toMillis</A></B>(long duration)</CODE> | |
<BR> | |
Equivalent to <tt>MILLISECONDS.convert(duration, this)</tt>.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>abstract long</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html#toMinutes(long)">toMinutes</A></B>(long duration)</CODE> | |
<BR> | |
Equivalent to <tt>MINUTES.convert(duration, this)</tt>.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>abstract long</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html#toNanos(long)">toNanos</A></B>(long duration)</CODE> | |
<BR> | |
Equivalent to <tt>NANOSECONDS.convert(duration, this)</tt>.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>abstract long</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html#toSeconds(long)">toSeconds</A></B>(long duration)</CODE> | |
<BR> | |
Equivalent to <tt>SECONDS.convert(duration, this)</tt>.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html#toString()">toString</A></B>()</CODE> | |
<BR> | |
</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static <A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html" title="class in org.apache.openjpa.lib.util.concurrent">TimeUnit</A>[]</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html#values()">values</A></B>()</CODE> | |
<BR> | |
</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.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD> | |
</TR> | |
</TABLE> | |
| |
<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="NANOSECONDS"><!-- --></A><H3> | |
NANOSECONDS</H3> | |
<PRE> | |
public static final <A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html" title="class in org.apache.openjpa.lib.util.concurrent">TimeUnit</A> <B>NANOSECONDS</B></PRE> | |
<DL> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="MICROSECONDS"><!-- --></A><H3> | |
MICROSECONDS</H3> | |
<PRE> | |
public static final <A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html" title="class in org.apache.openjpa.lib.util.concurrent">TimeUnit</A> <B>MICROSECONDS</B></PRE> | |
<DL> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="MILLISECONDS"><!-- --></A><H3> | |
MILLISECONDS</H3> | |
<PRE> | |
public static final <A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html" title="class in org.apache.openjpa.lib.util.concurrent">TimeUnit</A> <B>MILLISECONDS</B></PRE> | |
<DL> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="SECONDS"><!-- --></A><H3> | |
SECONDS</H3> | |
<PRE> | |
public static final <A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html" title="class in org.apache.openjpa.lib.util.concurrent">TimeUnit</A> <B>SECONDS</B></PRE> | |
<DL> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="MINUTES"><!-- --></A><H3> | |
MINUTES</H3> | |
<PRE> | |
public static final <A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html" title="class in org.apache.openjpa.lib.util.concurrent">TimeUnit</A> <B>MINUTES</B></PRE> | |
<DL> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="HOURS"><!-- --></A><H3> | |
HOURS</H3> | |
<PRE> | |
public static final <A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html" title="class in org.apache.openjpa.lib.util.concurrent">TimeUnit</A> <B>HOURS</B></PRE> | |
<DL> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="DAYS"><!-- --></A><H3> | |
DAYS</H3> | |
<PRE> | |
public static final <A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html" title="class in org.apache.openjpa.lib.util.concurrent">TimeUnit</A> <B>DAYS</B></PRE> | |
<DL> | |
<DL> | |
</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="values()"><!-- --></A><H3> | |
values</H3> | |
<PRE> | |
public static <A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html" title="class in org.apache.openjpa.lib.util.concurrent">TimeUnit</A>[] <B>values</B>()</PRE> | |
<DL> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="convert(long, org.apache.openjpa.lib.util.concurrent.TimeUnit)"><!-- --></A><H3> | |
convert</H3> | |
<PRE> | |
public abstract long <B>convert</B>(long sourceDuration, | |
<A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html" title="class in org.apache.openjpa.lib.util.concurrent">TimeUnit</A> sourceUnit)</PRE> | |
<DL> | |
<DD>Convert the given time duration in the given unit to this | |
unit. Conversions from finer to coarser granularities | |
truncate, so lose precision. For example converting | |
<tt>999</tt> milliseconds to seconds results in | |
<tt>0</tt>. Conversions from coarser to finer granularities | |
with arguments that would numerically overflow saturate to | |
<tt>Long.MIN_VALUE</tt> if negative or <tt>Long.MAX_VALUE</tt> | |
if positive. For example, to convert 10 minutes to milliseconds, use: | |
<tt>TimeUnit.MILLISECONDS.convert(10L, TimeUnit.MINUTES)</tt> | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>sourceDuration</CODE> - the time duration in the given <tt>sourceUnit</tt><DD><CODE>sourceUnit</CODE> - the unit of the <tt>sourceDuration</tt> argument | |
<DT><B>Returns:</B><DD>the converted duration in this unit, | |
or <tt>Long.MIN_VALUE</tt> if conversion would negatively | |
overflow, or <tt>Long.MAX_VALUE</tt> if it would positively overflow.</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="toNanos(long)"><!-- --></A><H3> | |
toNanos</H3> | |
<PRE> | |
public abstract long <B>toNanos</B>(long duration)</PRE> | |
<DL> | |
<DD>Equivalent to <tt>NANOSECONDS.convert(duration, this)</tt>. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>duration</CODE> - the duration | |
<DT><B>Returns:</B><DD>the converted duration, | |
or <tt>Long.MIN_VALUE</tt> if conversion would negatively | |
overflow, or <tt>Long.MAX_VALUE</tt> if it would positively overflow.<DT><B>See Also:</B><DD><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html#convert(long, org.apache.openjpa.lib.util.concurrent.TimeUnit)"><CODE>convert(long, org.apache.openjpa.lib.util.concurrent.TimeUnit)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="toMicros(long)"><!-- --></A><H3> | |
toMicros</H3> | |
<PRE> | |
public abstract long <B>toMicros</B>(long duration)</PRE> | |
<DL> | |
<DD>Equivalent to <tt>MICROSECONDS.convert(duration, this)</tt>. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>duration</CODE> - the duration | |
<DT><B>Returns:</B><DD>the converted duration, | |
or <tt>Long.MIN_VALUE</tt> if conversion would negatively | |
overflow, or <tt>Long.MAX_VALUE</tt> if it would positively overflow.<DT><B>See Also:</B><DD><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html#convert(long, org.apache.openjpa.lib.util.concurrent.TimeUnit)"><CODE>convert(long, org.apache.openjpa.lib.util.concurrent.TimeUnit)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="toMillis(long)"><!-- --></A><H3> | |
toMillis</H3> | |
<PRE> | |
public abstract long <B>toMillis</B>(long duration)</PRE> | |
<DL> | |
<DD>Equivalent to <tt>MILLISECONDS.convert(duration, this)</tt>. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>duration</CODE> - the duration | |
<DT><B>Returns:</B><DD>the converted duration, | |
or <tt>Long.MIN_VALUE</tt> if conversion would negatively | |
overflow, or <tt>Long.MAX_VALUE</tt> if it would positively overflow.<DT><B>See Also:</B><DD><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html#convert(long, org.apache.openjpa.lib.util.concurrent.TimeUnit)"><CODE>convert(long, org.apache.openjpa.lib.util.concurrent.TimeUnit)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="toSeconds(long)"><!-- --></A><H3> | |
toSeconds</H3> | |
<PRE> | |
public abstract long <B>toSeconds</B>(long duration)</PRE> | |
<DL> | |
<DD>Equivalent to <tt>SECONDS.convert(duration, this)</tt>. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>duration</CODE> - the duration | |
<DT><B>Returns:</B><DD>the converted duration, | |
or <tt>Long.MIN_VALUE</tt> if conversion would negatively | |
overflow, or <tt>Long.MAX_VALUE</tt> if it would positively overflow.<DT><B>See Also:</B><DD><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html#convert(long, org.apache.openjpa.lib.util.concurrent.TimeUnit)"><CODE>convert(long, org.apache.openjpa.lib.util.concurrent.TimeUnit)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="toMinutes(long)"><!-- --></A><H3> | |
toMinutes</H3> | |
<PRE> | |
public abstract long <B>toMinutes</B>(long duration)</PRE> | |
<DL> | |
<DD>Equivalent to <tt>MINUTES.convert(duration, this)</tt>. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>duration</CODE> - the duration | |
<DT><B>Returns:</B><DD>the converted duration, | |
or <tt>Long.MIN_VALUE</tt> if conversion would negatively | |
overflow, or <tt>Long.MAX_VALUE</tt> if it would positively overflow.<DT><B>Since:</B></DT> | |
<DD>1.6</DD> | |
<DT><B>See Also:</B><DD><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html#convert(long, org.apache.openjpa.lib.util.concurrent.TimeUnit)"><CODE>convert(long, org.apache.openjpa.lib.util.concurrent.TimeUnit)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="toHours(long)"><!-- --></A><H3> | |
toHours</H3> | |
<PRE> | |
public abstract long <B>toHours</B>(long duration)</PRE> | |
<DL> | |
<DD>Equivalent to <tt>HOURS.convert(duration, this)</tt>. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>duration</CODE> - the duration | |
<DT><B>Returns:</B><DD>the converted duration, | |
or <tt>Long.MIN_VALUE</tt> if conversion would negatively | |
overflow, or <tt>Long.MAX_VALUE</tt> if it would positively overflow.<DT><B>Since:</B></DT> | |
<DD>1.6</DD> | |
<DT><B>See Also:</B><DD><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html#convert(long, org.apache.openjpa.lib.util.concurrent.TimeUnit)"><CODE>convert(long, org.apache.openjpa.lib.util.concurrent.TimeUnit)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="toDays(long)"><!-- --></A><H3> | |
toDays</H3> | |
<PRE> | |
public abstract long <B>toDays</B>(long duration)</PRE> | |
<DL> | |
<DD>Equivalent to <tt>DAYS.convert(duration, this)</tt>. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>duration</CODE> - the duration | |
<DT><B>Returns:</B><DD>the converted duration<DT><B>Since:</B></DT> | |
<DD>1.6</DD> | |
<DT><B>See Also:</B><DD><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/TimeUnit.html#convert(long, org.apache.openjpa.lib.util.concurrent.TimeUnit)"><CODE>convert(long, org.apache.openjpa.lib.util.concurrent.TimeUnit)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="timedWait(java.lang.Object, long)"><!-- --></A><H3> | |
timedWait</H3> | |
<PRE> | |
public void <B>timedWait</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> obj, | |
long timeout) | |
throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/InterruptedException.html" title="class or interface in java.lang">InterruptedException</A></PRE> | |
<DL> | |
<DD>Performs a timed <tt>Object.wait</tt> using this time unit. | |
This is a convenience method that converts timeout arguments | |
into the form required by the <tt>Object.wait</tt> method. | |
For example, you could implement a blocking <tt>poll</tt> | |
method(see <CODE>BlockingQueue.poll</CODE>) using: | |
<pre> public synchronized Object poll(long timeout, TimeUnit unit) | |
throws InterruptedException { while (empty) { | |
unit.timedWait(this, timeout); ... } }</pre> | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>obj</CODE> - the object to wait on<DD><CODE>timeout</CODE> - the maximum time to wait. If less than | |
or equal to zero, do not wait at all. | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/InterruptedException.html" title="class or interface in java.lang">InterruptedException</A></CODE> - if interrupted while waiting.<DT><B>See Also:</B><DD><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang"><CODE>Object.wait(long, int)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="timedJoin(java.lang.Thread, long)"><!-- --></A><H3> | |
timedJoin</H3> | |
<PRE> | |
public void <B>timedJoin</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Thread.html" title="class or interface in java.lang">Thread</A> thread, | |
long timeout) | |
throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/InterruptedException.html" title="class or interface in java.lang">InterruptedException</A></PRE> | |
<DL> | |
<DD>Performs a timed <tt>Thread.join</tt> using this time unit. | |
This is a convenience method that converts time arguments into the | |
form required by the <tt>Thread.join</tt> method. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>thread</CODE> - the thread to wait for<DD><CODE>timeout</CODE> - the maximum time to wait. If less than | |
or equal to zero, do not wait at all. | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/InterruptedException.html" title="class or interface in java.lang">InterruptedException</A></CODE> - if interrupted while waiting.<DT><B>See Also:</B><DD><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Thread.html#join(long, int)" title="class or interface in java.lang"><CODE>Thread.join(long, int)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="sleep(long)"><!-- --></A><H3> | |
sleep</H3> | |
<PRE> | |
public void <B>sleep</B>(long timeout) | |
throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/InterruptedException.html" title="class or interface in java.lang">InterruptedException</A></PRE> | |
<DL> | |
<DD>Performs a <tt>Thread.sleep</tt> using this unit. | |
This is a convenience method that converts time arguments into the | |
form required by the <tt>Thread.sleep</tt> method. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>timeout</CODE> - the maximum time to sleep. If less than | |
or equal to zero, do not sleep at all. | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/InterruptedException.html" title="class or interface in java.lang">InterruptedException</A></CODE> - if interrupted while sleeping.<DT><B>See Also:</B><DD><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Thread.html#sleep(long)" title="class or interface in java.lang"><CODE>Thread.sleep(long)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="toString()"><!-- --></A><H3> | |
toString</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>toString</B>()</PRE> | |
<DL> | |
<DD><DL> | |
<DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
</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"> <A HREF="#main"><FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/TimeUnit.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> | |
</EM> | |
</TD> | |
</TR> | |
<TR> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/ReentrantLock.html" title="class in org.apache.openjpa.lib.util.concurrent"><B>PREV CLASS</B></A> | |
<A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/Utils.html" title="class in org.apache.openjpa.lib.util.concurrent"><B>NEXT CLASS</B></A></FONT></TD> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../../../index.html?org/apache/openjpa/lib/util/concurrent/TimeUnit.html" target="_top"><B>FRAMES</B></A> | |
<A HREF="TimeUnit.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 | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> | |
</TR> | |
</TABLE> | |
<A NAME="skip-navbar_bottom"></A> | |
<!-- ======== END OF BOTTOM NAVBAR ======= --> | |
<HR> | |
Copyright © 2006-2007 <a href="http://www.apache.org">Apache Software Foundation</a>. All Rights Reserved. | |
</BODY> | |
</HTML> |