private long createTimeUnsafe(long when, int nanos) { long nanosSince = ((when - START_EPOCH) * 10000) + nanos; return createTime(nanosSince); }
private long createTimeUnsafe(long when, int nanos) { long nanosSince = ((when - START_EPOCH) * 10000) + nanos; return createTime(nanosSince); }
private long createTimeUnsafe(long when, int nanos) { long nanosSince = ((when - START_EPOCH) * 10000) + nanos; return createTime(nanosSince); }
private long createTimeUnsafe(long when, int nanos) { long nanosSince = ((when - START_EPOCH) * 10000) + nanos; return createTime(nanosSince); }
private synchronized long createTimeSafe() { long nanosSince = (System.currentTimeMillis() - START_EPOCH) * 10000; if (nanosSince > lastNanos) lastNanos = nanosSince; else nanosSince = ++lastNanos; return createTime(nanosSince); }
@VisibleForTesting public static UUID getTimeUUID(long when, long nanos, long clockSeqAndNode) { return new UUID(createTime(fromUnixTimestamp(when, nanos)), clockSeqAndNode); }
/** * Returns the smaller possible type 1 UUID having the provided timestamp. * * <b>Warning:</b> this method should only be used for querying as this * doesn't at all guarantee the uniqueness of the resulting UUID. */ public static UUID minTimeUUID(long timestamp) { return new UUID(createTime(fromUnixTimestamp(timestamp)), MIN_CLOCK_SEQ_AND_NODE); }
@VisibleForTesting public static UUID getTimeUUID(long when, long nanos, long clockSeqAndNode) { return new UUID(createTime(fromUnixTimestamp(when, nanos)), clockSeqAndNode); }
/** * Creates a type 1 UUID (time-based UUID) with the timestamp of @param when, in milliseconds. * * @return a UUID instance */ public static UUID getTimeUUID(long when) { return new UUID(createTime(fromUnixTimestamp(when)), clockSeqAndNode); }
/** * Returns the smaller possible type 1 UUID having the provided timestamp. * * <b>Warning:</b> this method should only be used for querying as this * doesn't at all guarantee the uniqueness of the resulting UUID. */ public static UUID minTimeUUID(long timestamp) { return new UUID(createTime(fromUnixTimestamp(timestamp)), MIN_CLOCK_SEQ_AND_NODE); }
public static UUID getTimeUUID(long when, long nanos) { return new UUID(createTime(fromUnixTimestamp(when, nanos)), clockSeqAndNode); }
/** * Creates a type 1 UUID (time-based UUID) with the timestamp of @param when, in milliseconds. * * @return a UUID instance */ public static UUID getTimeUUID(long when) { return new UUID(createTime(fromUnixTimestamp(when)), clockSeqAndNode); }
@VisibleForTesting public static UUID getTimeUUID(long when, long nanos, long clockSeqAndNode) { return new UUID(createTime(fromUnixTimestamp(when, nanos)), clockSeqAndNode); }
/** * Returns the smaller possible type 1 UUID having the provided timestamp. * * <b>Warning:</b> this method should only be used for querying as this * doesn't at all guarantee the uniqueness of the resulting UUID. */ public static UUID minTimeUUID(long timestamp) { return new UUID(createTime(fromUnixTimestamp(timestamp)), MIN_CLOCK_SEQ_AND_NODE); }
/** * Returns the smaller possible type 1 UUID having the provided timestamp. * * <b>Warning:</b> this method should only be used for querying as this * doesn't at all guarantee the uniqueness of the resulting UUID. */ public static UUID minTimeUUID(long timestamp) { return new UUID(createTime(fromUnixTimestamp(timestamp)), MIN_CLOCK_SEQ_AND_NODE); }
/** * Creates a type 1 UUID (time-based UUID) with the timestamp of @param when, in milliseconds. * * @return a UUID instance */ public static UUID getTimeUUID(long when) { return new UUID(createTime(fromUnixTimestamp(when)), clockSeqAndNode); }
@VisibleForTesting public static UUID getTimeUUID(long when, long nanos, long clockSeqAndNode) { return new UUID(createTime(fromUnixTimestamp(when, nanos)), clockSeqAndNode); }
/** * Creates a type 1 UUID (time-based UUID) with the timestamp of @param when, in milliseconds. * * @return a UUID instance */ public static UUID getTimeUUID(long when) { return new UUID(createTime(fromUnixTimestamp(when)), clockSeqAndNode); }
/** * Returns the smaller possible type 1 UUID having the provided timestamp. * * <b>Warning:</b> this method should only be used for querying as this * doesn't at all guarantee the uniqueness of the resulting UUID. */ public static UUID minTimeUUID(long timestamp) { return new UUID(createTime(fromUnixTimestamp(timestamp)), MIN_CLOCK_SEQ_AND_NODE); }
/** * Creates a type 1 UUID (time-based UUID) with the timestamp of @param when, in milliseconds. * * @return a UUID instance */ public static UUID getTimeUUID(long when) { return new UUID(createTime(fromUnixTimestamp(when)), clockSeqAndNode); }