|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Clock
Provides a timing mechanism for returning the current time in 100-nano second intervals since 00:00:00.00, 15 October 1582.
As described below this is useful for generating Version 1 UUIDs
See the RFC 4122: A Universally Unique IDentifier (UUID) URN Namespace for more information.
Selected quotes from IETF document pertaining to this class:
====================================================================
The above quotations are protected under the following copyright notice
Copyright (C) The Internet Society (2005).
This document is subject to the rights, licenses and restrictions
contained in BCP 78, and except as set forth therein, the authors
retain all their rights.
This document and the information contained herein are provided on an
"AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_CLOCK_IMPL
The default Clock implementation if not configured |
static long |
GREGORIAN_CHANGE_OFFSET
Offset from GregorianCalendar Change over to Jan 1 1970 00:00:00.00 |
static long |
INTERVALS_PER_MILLI
Maximum ticks per millisecond interval (1 millisecond = 1 000 000 nanoseconds) / 100 |
Method Summary | |
---|---|
long |
getUUIDTime()
Returns the current time. |
Field Detail |
---|
static final java.lang.String DEFAULT_CLOCK_IMPL
static final long GREGORIAN_CHANGE_OFFSET
static final long INTERVALS_PER_MILLI
Method Detail |
---|
long getUUIDTime() throws OverClockedException
Returns the current time.
OverClockedException
- an Exception raised if the number of calls
in a system time interval exceeds the number of 100-nanosecond intervals
allowed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |