Module com.github.f4b6a3.uuid
Class DefaultClockSeqFunction
- java.lang.Object
-
- com.github.f4b6a3.uuid.factory.function.impl.DefaultClockSeqFunction
-
- All Implemented Interfaces:
ClockSeqFunction,LongUnaryOperator
public final class DefaultClockSeqFunction extends Object implements ClockSeqFunction
Function that returns a clock sequence.- See Also:
ClockSeqFunction
-
-
Field Summary
Fields Modifier and Type Field Description protected static com.github.f4b6a3.uuid.factory.function.impl.DefaultClockSeqFunction.ClockSeqPoolPOOLThe pool of clock sequence numbers.
-
Constructor Summary
Constructors Constructor Description DefaultClockSeqFunction()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longapplyAsLong(long timestamp)intnext()Get the next random clock sequence number.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.function.LongUnaryOperator
andThen, compose
-
-
-
-
Method Detail
-
applyAsLong
public long applyAsLong(long timestamp)
- Specified by:
applyAsLongin interfaceLongUnaryOperator
-
next
public int next()
Get the next random clock sequence number.- Returns:
- a number
-
-