| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <link rel="canonical" href="https://ignite.apache.org/jcache/1.0.0/javadoc/javax/cache/expiry/Duration.html" /> |
| <!-- Generated by javadoc (version 1.7.0_25) on Fri Mar 28 13:34:25 EST 2014 --> |
| <meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> |
| <title>Duration (JSR107 API and SPI 1.0.0 API)</title> |
| <meta name="date" content="2014-03-28"> |
| <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> |
| |
| <script> |
| (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ |
| (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), |
| m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) |
| })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); |
| |
| ga('create', 'UA-61232409-1', 'auto'); |
| ga('send', 'pageview'); |
| |
| </script></head> |
| <body> |
| <script type="text/javascript"><!-- |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="Duration (JSR107 API and SPI 1.0.0 API)"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar_top"> |
| <!-- --> |
| </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/Duration.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../index-all.html">Index</a></li> |
| <li><a href="../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../javax/cache/expiry/CreatedExpiryPolicy.html" title="class in javax.cache.expiry"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../../javax/cache/expiry/EternalExpiryPolicy.html" title="class in javax.cache.expiry"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?javax/cache/expiry/Duration.html" target="_top">Frames</a></li> |
| <li><a href="Duration.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field_summary">Field</a> | </li> |
| <li><a href="#constructor_summary">Constr</a> | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field_detail">Field</a> | </li> |
| <li><a href="#constructor_detail">Constr</a> | </li> |
| <li><a href="#method_detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">javax.cache.expiry</div> |
| <h2 title="Class Duration" class="title">Class Duration</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>javax.cache.expiry.Duration</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><a href="http://download.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public class <span class="strong">Duration</span> |
| extends <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> |
| implements <a href="http://download.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></pre> |
| <div class="block">A <a href="http://download.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io"><code>Serializable</code></a> duration of time.</div> |
| <dl><dt><span class="strong">Since:</span></dt> |
| <dd>1.0</dd> |
| <dt><span class="strong">Author:</span></dt> |
| <dd>Yannis Cosmadopoulos, Greg Luck, Brian Oliver</dd> |
| <dt><span class="strong">See Also:</span></dt><dd><a href="../../../javax/cache/expiry/ExpiryPolicy.html" title="interface in javax.cache.expiry"><code>ExpiryPolicy</code></a>, |
| <a href="../../../serialized-form.html#javax.cache.expiry.Duration">Serialized Form</a></dd></dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field_summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Field and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../javax/cache/expiry/Duration.html" title="class in javax.cache.expiry">Duration</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../javax/cache/expiry/Duration.html#ETERNAL">ETERNAL</a></strong></code> |
| <div class="block">ETERNAL (forever).</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../javax/cache/expiry/Duration.html" title="class in javax.cache.expiry">Duration</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../javax/cache/expiry/Duration.html#FIVE_MINUTES">FIVE_MINUTES</a></strong></code> |
| <div class="block">Five minutes.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../javax/cache/expiry/Duration.html" title="class in javax.cache.expiry">Duration</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../javax/cache/expiry/Duration.html#ONE_DAY">ONE_DAY</a></strong></code> |
| <div class="block">One day.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../javax/cache/expiry/Duration.html" title="class in javax.cache.expiry">Duration</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../javax/cache/expiry/Duration.html#ONE_HOUR">ONE_HOUR</a></strong></code> |
| <div class="block">One hour.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../javax/cache/expiry/Duration.html" title="class in javax.cache.expiry">Duration</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../javax/cache/expiry/Duration.html#ONE_MINUTE">ONE_MINUTE</a></strong></code> |
| <div class="block">One minute.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static long</code></td> |
| <td class="colLast"><code><strong><a href="../../../javax/cache/expiry/Duration.html#serialVersionUID">serialVersionUID</a></strong></code> |
| <div class="block">The serialVersionUID required for <a href="http://download.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io"><code>Serializable</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../javax/cache/expiry/Duration.html" title="class in javax.cache.expiry">Duration</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../javax/cache/expiry/Duration.html#TEN_MINUTES">TEN_MINUTES</a></strong></code> |
| <div class="block">Ten minutes.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../javax/cache/expiry/Duration.html" title="class in javax.cache.expiry">Duration</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../javax/cache/expiry/Duration.html#THIRTY_MINUTES">THIRTY_MINUTES</a></strong></code> |
| <div class="block">Thirty minutes.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../javax/cache/expiry/Duration.html" title="class in javax.cache.expiry">Duration</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../javax/cache/expiry/Duration.html#TWENTY_MINUTES">TWENTY_MINUTES</a></strong></code> |
| <div class="block">Twenty minutes.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../javax/cache/expiry/Duration.html" title="class in javax.cache.expiry">Duration</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../javax/cache/expiry/Duration.html#ZERO">ZERO</a></strong></code> |
| <div class="block">Zero (no time).</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor_summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><strong><a href="../../../javax/cache/expiry/Duration.html#Duration()">Duration</a></strong>()</code> |
| <div class="block">Constructs a Duration (that by default is Eternal).</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colOne"><code><strong><a href="../../../javax/cache/expiry/Duration.html#Duration(long, long)">Duration</a></strong>(long startTime, |
| long endTime)</code> |
| <div class="block">Constructs a <a href="../../../javax/cache/expiry/Duration.html" title="class in javax.cache.expiry"><code>Duration</code></a> based on the duration between two |
| specified points in time (since the Epoc), measured in milliseconds.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><strong><a href="../../../javax/cache/expiry/Duration.html#Duration(java.util.concurrent.TimeUnit, long)">Duration</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent">TimeUnit</a> timeUnit, |
| long durationAmount)</code> |
| <div class="block">Constructs a duration.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span>Methods</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../javax/cache/expiry/Duration.html#equals(java.lang.Object)">equals</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> other)</code></td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><strong><a href="../../../javax/cache/expiry/Duration.html#getAdjustedTime(long)">getAdjustedTime</a></strong>(long time)</code> |
| <div class="block">Calculates the adjusted time (from the Epoc) given a specified time |
| (to be adjusted) by the duration.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><strong><a href="../../../javax/cache/expiry/Duration.html#getDurationAmount()">getDurationAmount</a></strong>()</code> |
| <div class="block">Obtain the number of TimeUnits in the Duration</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="http://download.oracle.com/javase/6/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent">TimeUnit</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../javax/cache/expiry/Duration.html#getTimeUnit()">getTimeUnit</a></strong>()</code> |
| <div class="block">Obtain the TimeUnit for the Duration</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><strong><a href="../../../javax/cache/expiry/Duration.html#hashCode()">hashCode</a></strong>()</code></td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../javax/cache/expiry/Duration.html#isEternal()">isEternal</a></strong>()</code> |
| <div class="block">Determines if a <a href="../../../javax/cache/expiry/Duration.html" title="class in javax.cache.expiry"><code>Duration</code></a> is eternal (forever).</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../javax/cache/expiry/Duration.html#isZero()">isZero</a></strong>()</code> |
| <div class="block">Determines if a <a href="../../../javax/cache/expiry/Duration.html" title="class in javax.cache.expiry"><code>Duration</code></a> is zero.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods_inherited_from_class_java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field_detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a name="serialVersionUID"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>serialVersionUID</h4> |
| <pre>public static final long serialVersionUID</pre> |
| <div class="block">The serialVersionUID required for <a href="http://download.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io"><code>Serializable</code></a>.</div> |
| <dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#javax.cache.expiry.Duration.serialVersionUID">Constant Field Values</a></dd></dl> |
| </li> |
| </ul> |
| <a name="ETERNAL"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ETERNAL</h4> |
| <pre>public static final <a href="../../../javax/cache/expiry/Duration.html" title="class in javax.cache.expiry">Duration</a> ETERNAL</pre> |
| <div class="block">ETERNAL (forever).</div> |
| </li> |
| </ul> |
| <a name="ONE_DAY"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ONE_DAY</h4> |
| <pre>public static final <a href="../../../javax/cache/expiry/Duration.html" title="class in javax.cache.expiry">Duration</a> ONE_DAY</pre> |
| <div class="block">One day.</div> |
| </li> |
| </ul> |
| <a name="ONE_HOUR"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ONE_HOUR</h4> |
| <pre>public static final <a href="../../../javax/cache/expiry/Duration.html" title="class in javax.cache.expiry">Duration</a> ONE_HOUR</pre> |
| <div class="block">One hour.</div> |
| </li> |
| </ul> |
| <a name="THIRTY_MINUTES"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>THIRTY_MINUTES</h4> |
| <pre>public static final <a href="../../../javax/cache/expiry/Duration.html" title="class in javax.cache.expiry">Duration</a> THIRTY_MINUTES</pre> |
| <div class="block">Thirty minutes.</div> |
| </li> |
| </ul> |
| <a name="TWENTY_MINUTES"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>TWENTY_MINUTES</h4> |
| <pre>public static final <a href="../../../javax/cache/expiry/Duration.html" title="class in javax.cache.expiry">Duration</a> TWENTY_MINUTES</pre> |
| <div class="block">Twenty minutes.</div> |
| </li> |
| </ul> |
| <a name="TEN_MINUTES"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>TEN_MINUTES</h4> |
| <pre>public static final <a href="../../../javax/cache/expiry/Duration.html" title="class in javax.cache.expiry">Duration</a> TEN_MINUTES</pre> |
| <div class="block">Ten minutes.</div> |
| </li> |
| </ul> |
| <a name="FIVE_MINUTES"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>FIVE_MINUTES</h4> |
| <pre>public static final <a href="../../../javax/cache/expiry/Duration.html" title="class in javax.cache.expiry">Duration</a> FIVE_MINUTES</pre> |
| <div class="block">Five minutes.</div> |
| </li> |
| </ul> |
| <a name="ONE_MINUTE"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ONE_MINUTE</h4> |
| <pre>public static final <a href="../../../javax/cache/expiry/Duration.html" title="class in javax.cache.expiry">Duration</a> ONE_MINUTE</pre> |
| <div class="block">One minute.</div> |
| </li> |
| </ul> |
| <a name="ZERO"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>ZERO</h4> |
| <pre>public static final <a href="../../../javax/cache/expiry/Duration.html" title="class in javax.cache.expiry">Duration</a> ZERO</pre> |
| <div class="block">Zero (no time).</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor_detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="Duration()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>Duration</h4> |
| <pre>public Duration()</pre> |
| <div class="block">Constructs a Duration (that by default is Eternal).</div> |
| </li> |
| </ul> |
| <a name="Duration(java.util.concurrent.TimeUnit, long)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>Duration</h4> |
| <pre>public Duration(<a href="http://download.oracle.com/javase/6/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent">TimeUnit</a> timeUnit, |
| long durationAmount)</pre> |
| <div class="block">Constructs a duration.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>timeUnit</code> - the unit of time to specify time in. The minimum time unit is milliseconds.</dd><dd><code>durationAmount</code> - how long, in the specified units, the cache entries should live. 0 means eternal.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if timeUnit is null</dd> |
| <dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if durationAmount is less than 0 or a TimeUnit less than milliseconds is specified</dd></dl> |
| </li> |
| </ul> |
| <a name="Duration(long, long)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>Duration</h4> |
| <pre>public Duration(long startTime, |
| long endTime)</pre> |
| <div class="block">Constructs a <a href="../../../javax/cache/expiry/Duration.html" title="class in javax.cache.expiry"><code>Duration</code></a> based on the duration between two |
| specified points in time (since the Epoc), measured in milliseconds.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>startTime</code> - the start time (since the Epoc)</dd><dd><code>endTime</code> - the end time (since the Epoc)</dd></dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="getTimeUnit()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getTimeUnit</h4> |
| <pre>public <a href="http://download.oracle.com/javase/6/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent">TimeUnit</a> getTimeUnit()</pre> |
| <div class="block">Obtain the TimeUnit for the Duration</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>the TimeUnit</dd></dl> |
| </li> |
| </ul> |
| <a name="getDurationAmount()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getDurationAmount</h4> |
| <pre>public long getDurationAmount()</pre> |
| <div class="block">Obtain the number of TimeUnits in the Duration</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>the number of TimeUnits</dd></dl> |
| </li> |
| </ul> |
| <a name="isEternal()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isEternal</h4> |
| <pre>public boolean isEternal()</pre> |
| <div class="block">Determines if a <a href="../../../javax/cache/expiry/Duration.html" title="class in javax.cache.expiry"><code>Duration</code></a> is eternal (forever).</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>true if the <a href="../../../javax/cache/expiry/Duration.html" title="class in javax.cache.expiry"><code>Duration</code></a> is eternal</dd></dl> |
| </li> |
| </ul> |
| <a name="isZero()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isZero</h4> |
| <pre>public boolean isZero()</pre> |
| <div class="block">Determines if a <a href="../../../javax/cache/expiry/Duration.html" title="class in javax.cache.expiry"><code>Duration</code></a> is zero.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>true if the <a href="../../../javax/cache/expiry/Duration.html" title="class in javax.cache.expiry"><code>Duration</code></a> is zero</dd></dl> |
| </li> |
| </ul> |
| <a name="getAdjustedTime(long)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAdjustedTime</h4> |
| <pre>public long getAdjustedTime(long time)</pre> |
| <div class="block">Calculates the adjusted time (from the Epoc) given a specified time |
| (to be adjusted) by the duration.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>time</code> - the time from which to adjust given the duration</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the adjusted time</dd></dl> |
| </li> |
| </ul> |
| <a name="equals(java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>equals</h4> |
| <pre>public boolean equals(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> other)</pre> |
| <dl> |
| <dt><strong>Overrides:</strong></dt> |
| <dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a></code> in class <code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="hashCode()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>hashCode</h4> |
| <pre>public int hashCode()</pre> |
| <dl> |
| <dt><strong>Overrides:</strong></dt> |
| <dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a></code> in class <code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar_bottom"> |
| <!-- --> |
| </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/Duration.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../index-all.html">Index</a></li> |
| <li><a href="../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../javax/cache/expiry/CreatedExpiryPolicy.html" title="class in javax.cache.expiry"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../../javax/cache/expiry/EternalExpiryPolicy.html" title="class in javax.cache.expiry"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?javax/cache/expiry/Duration.html" target="_top">Frames</a></li> |
| <li><a href="Duration.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field_summary">Field</a> | </li> |
| <li><a href="#constructor_summary">Constr</a> | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field_detail">Field</a> | </li> |
| <li><a href="#constructor_detail">Constr</a> | </li> |
| <li><a href="#method_detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2014. All Rights Reserved.</small></p> |
| </body> |
| </html> |