Package com.tuladb
Class Hlc
java.lang.Object
com.tuladb.Hlc
Hybrid Logical Clock helpers for TulaDB SDK users.
Layout: high 48 bits = Unix epoch milliseconds, low 16 bits = logical counter.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final longstatic final long -
Method Summary
-
Field Details
-
LOGICAL_BITS
public static final int LOGICAL_BITS- See Also:
-
LOGICAL_MASK
public static final long LOGICAL_MASK- See Also:
-
PHYSICAL_MAX_MS
public static final long PHYSICAL_MAX_MS- See Also:
-
-
Method Details
-
encode
public static long encode(long physicalMs, int logical) -
decode
-
physicalMs
public static long physicalMs(long hlc) -
logical
public static int logical(long hlc) -
isoUtc
-