org.eclipse.jgit.util.time.MonotonicClock#propose() .
ProposedTimestamp implements AutoCloseable so that implementations can
release resources associated with obtaining certainty about time elapsing.
For example the constructing MonotonicClock may start network IO with peers
when creating the ProposedTimestamp, and close() can ensure those
network resources are released in a timely fashion.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static void | blockUntil(Iterable<ProposedTimestamp>
timestamps to wait on. times, Duration how long to wait for the timestamps. maxWait)Wait for several timestamps. |
| public abstract void | blockUntil(Duration
how long the implementation may block the caller. maxWait)Wait for this proposed timestamp to be certainly in the recent past. |
| public void | close()
Implements java. Closes this resource, relinquishing any underlying resources. |
| public Date | Returns: time since epoch, with up to millisecond resolution.
Deprecated
since 7.2. Use instant() instead
Get time since epoch, with up to millisecond resolution. |
| public Instant | Returns: time since epoch, with up to microsecond resolution.Get time since epoch, with up to microsecond resolution. |
| public long | Returns: microseconds since epoch;read(MICROSECONDS).Get microseconds since epoch; |
| public long | Returns: milliseconds since epoch;read(MILLISECONDS).Get milliseconds since epoch; |
| public abstract long | |
| public java. | Returns: time since epoch, with up to microsecond resolution.
Deprecated
since 7.2. Use instant() instead
Get time since epoch, with up to microsecond resolution. |
| public String |
| ProposedTimestamp | back to summary |
|---|---|
| public ProposedTimestamp() | |
| blockUntil | back to summary |
|---|---|
| public static void blockUntil(Iterable<ProposedTimestamp> times, Duration maxWait) throws TimeoutException, InterruptedException Wait for several timestamps.
| |
| blockUntil | back to summary |
|---|---|
| public abstract void blockUntil(Duration maxWait) throws InterruptedException, TimeoutException Wait for this proposed timestamp to be certainly in the recent past.
This method forces the caller to wait up to
| |
| close | back to summary |
|---|---|
| public void close() Implements java. Doc from java. Closes this resource, relinquishing any underlying resources.
This method is invoked automatically on objects managed by the
Release resources allocated by this timestamp.
| |
| date | back to summary |
|---|---|
| public Date date()
Deprecated since 7.2. Use instant() instead Get time since epoch, with up to millisecond resolution.
| |
| instant | back to summary |
|---|---|
| public Instant instant() Get time since epoch, with up to microsecond resolution.
| |
| micros | back to summary |
|---|---|
| public long micros() Get microseconds since epoch;
| |
| millis | back to summary |
|---|---|
| public long millis() Get milliseconds since epoch;
| |
| read | back to summary |
|---|---|
| public abstract long read(TimeUnit unit) Read the timestamp as
The timestamp value for a specific
| |
| timestamp | back to summary |
|---|---|
| public java. Deprecated since 7.2. Use instant() instead Get time since epoch, with up to microsecond resolution.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |