Class CombUtil


  • public final class CombUtil
    extends Object
    Utility that provides methods for extracting time from COMBs.
    • Method Detail

      • getPrefix

        public static long getPrefix​(UUID comb)
        Get the prefix from a Prefix COMB. The value returned is equivalent to the number of milliseconds since 1970-01-01 (Unix epoch).
        Parameters:
        comb - a Prefix COMB
        Returns:
        the prefix (the Unix milliseconds)
      • getSuffix

        public static long getSuffix​(UUID comb)
        Get the suffix from a Suffix COMB. The value returned is equivalent to the number of milliseconds since 1970-01-01 (Unix epoch).
        Parameters:
        comb - a Suffix COMB
        Returns:
        the suffix (the Unix milliseconds)
      • getPrefixInstant

        public static Instant getPrefixInstant​(UUID comb)
        Get the instant from a Prefix COMB.
        Parameters:
        comb - a Prefix COMB
        Returns:
        Instant
      • getSuffixInstant

        public static Instant getSuffixInstant​(UUID comb)
        Get the instant from a Suffix COMB.
        Parameters:
        comb - a Suffix COMB
        Returns:
        Instant