| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (1.8.0_144) on Sat Apr 25 12:11:42 MST 2020 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>Instant (Apache Log4j Core 2.13.2 API)</title> |
| <meta name="date" content="2020-04-25"> |
| <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="Instant (Apache Log4j Core 2.13.2 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":6,"i1":6,"i2":6,"i3":6}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <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/Instant.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>Prev Class</li> |
| <li><a href="../../../../../../org/apache/logging/log4j/core/time/MutableInstant.html" title="class in org.apache.logging.log4j.core.time"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../index.html?org/apache/logging/log4j/core/time/Instant.html" target="_top">Frames</a></li> |
| <li><a href="Instant.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>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </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">org.apache.logging.log4j.core.time</div> |
| <h2 title="Interface Instant" class="title">Interface Instant</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Superinterfaces:</dt> |
| <dd>org.apache.logging.log4j.util.StringBuilderFormattable</dd> |
| </dl> |
| <dl> |
| <dt>All Known Implementing Classes:</dt> |
| <dd><a href="../../../../../../org/apache/logging/log4j/core/time/MutableInstant.html" title="class in org.apache.logging.log4j.core.time">MutableInstant</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public interface <a href="../../../../../../src-html/org/apache/logging/log4j/core/time/Instant.html#line.37">Instant</a> |
| extends org.apache.logging.log4j.util.StringBuilderFormattable</pre> |
| <div class="block">Models a point in time, suitable for event timestamps. |
| <p> |
| Provides methods for obtaining high precision time information similar to the |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/time/Instant.html">Instant</a> class introduced in Java 8, |
| while also supporting the legacy millisecond precision API. |
| </p><p> |
| Depending on the platform, time sources (<a href="../../../../../../org/apache/logging/log4j/core/util/Clock.html" title="interface in org.apache.logging.log4j.core.util"><code>Clock</code></a> implementations) may produce high precision or millisecond |
| precision time values. At the same time, some time value consumers (for example timestamp formatters) may only be |
| able to consume time values of millisecond precision, while some others may require a high precision time value. |
| </p><p> |
| This class bridges these two time APIs. |
| </p></div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>2.11</dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/logging/log4j/core/time/Instant.html#getEpochMillisecond--">getEpochMillisecond</a></span>()</code> |
| <div class="block">Gets the number of milliseconds from the Java epoch of 1970-01-01T00:00:00Z.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/logging/log4j/core/time/Instant.html#getEpochSecond--">getEpochSecond</a></span>()</code> |
| <div class="block">Gets the number of seconds from the Java epoch of 1970-01-01T00:00:00Z.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/logging/log4j/core/time/Instant.html#getNanoOfMillisecond--">getNanoOfMillisecond</a></span>()</code> |
| <div class="block">Gets the number of nanoseconds, later along the time-line, from the start of the millisecond.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/logging/log4j/core/time/Instant.html#getNanoOfSecond--">getNanoOfSecond</a></span>()</code> |
| <div class="block">Gets the number of nanoseconds, later along the time-line, from the start of the second.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.logging.log4j.util.StringBuilderFormattable"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface org.apache.logging.log4j.util.StringBuilderFormattable</h3> |
| <code>formatTo</code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="getEpochSecond--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getEpochSecond</h4> |
| <pre>long <a href="../../../../../../src-html/org/apache/logging/log4j/core/time/Instant.html#line.46">getEpochSecond</a>()</pre> |
| <div class="block">Gets the number of seconds from the Java epoch of 1970-01-01T00:00:00Z. |
| <p> |
| The epoch second count is a simple incrementing count of seconds where second 0 is 1970-01-01T00:00:00Z. |
| The nanosecond part of the day is returned by <a href="../../../../../../org/apache/logging/log4j/core/time/Instant.html#getNanoOfSecond--"><code>getNanoOfSecond()</code></a>. |
| </p></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the seconds from the epoch of 1970-01-01T00:00:00Z</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getNanoOfSecond--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getNanoOfSecond</h4> |
| <pre>int <a href="../../../../../../src-html/org/apache/logging/log4j/core/time/Instant.html#line.55">getNanoOfSecond</a>()</pre> |
| <div class="block">Gets the number of nanoseconds, later along the time-line, from the start of the second. |
| <p> |
| The nanosecond-of-second value measures the total number of nanoseconds from the second returned by <a href="../../../../../../org/apache/logging/log4j/core/time/Instant.html#getEpochSecond--"><code>getEpochSecond()</code></a>. |
| </p></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the nanoseconds within the second, always positive, never exceeds <code>999,999,999</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getEpochMillisecond--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getEpochMillisecond</h4> |
| <pre>long <a href="../../../../../../src-html/org/apache/logging/log4j/core/time/Instant.html#line.65">getEpochMillisecond</a>()</pre> |
| <div class="block">Gets the number of milliseconds from the Java epoch of 1970-01-01T00:00:00Z. |
| <p> |
| The epoch millisecond count is a simple incrementing count of milliseconds where millisecond 0 is 1970-01-01T00:00:00Z. |
| The nanosecond part of the day is returned by <a href="../../../../../../org/apache/logging/log4j/core/time/Instant.html#getNanoOfMillisecond--"><code>getNanoOfMillisecond()</code></a>. |
| </p></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the milliseconds from the epoch of 1970-01-01T00:00:00Z</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getNanoOfMillisecond--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>getNanoOfMillisecond</h4> |
| <pre>int <a href="../../../../../../src-html/org/apache/logging/log4j/core/time/Instant.html#line.74">getNanoOfMillisecond</a>()</pre> |
| <div class="block">Gets the number of nanoseconds, later along the time-line, from the start of the millisecond. |
| <p> |
| The nanosecond-of-millisecond value measures the total number of nanoseconds from the millisecond returned by <a href="../../../../../../org/apache/logging/log4j/core/time/Instant.html#getEpochMillisecond--"><code>getEpochMillisecond()</code></a>. |
| </p></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the nanoseconds within the millisecond, always positive, never exceeds <code>999,999</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> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <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/Instant.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>Prev Class</li> |
| <li><a href="../../../../../../org/apache/logging/log4j/core/time/MutableInstant.html" title="class in org.apache.logging.log4j.core.time"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../index.html?org/apache/logging/log4j/core/time/Instant.html" target="_top">Frames</a></li> |
| <li><a href="Instant.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>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </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><p align="center">Copyright © 1999-2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.<br /> Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.</p></small></p> |
| </body> |
| </html> |