Class SuffixCombFactory

  • All Implemented Interfaces:
    NoArgsFactory

    public final class SuffixCombFactory
    extends AbstRandomBasedFactory
    Factory that creates Suffix COMB GUIDs. A Suffix COMB GUID is a UUID that combines a creation time with random bits. The creation millisecond is a 6 bytes SUFFIX at the LEAST significant bits. Read: The Cost of GUIDs as Primary Keys http://www.informit.com/articles/article.aspx?p=25862
    • Constructor Detail

      • SuffixCombFactory

        public SuffixCombFactory()
      • SuffixCombFactory

        public SuffixCombFactory​(Clock clock)
      • SuffixCombFactory

        public SuffixCombFactory​(Random random)
      • SuffixCombFactory

        public SuffixCombFactory​(Random random,
                                 Clock clock)
      • SuffixCombFactory

        public SuffixCombFactory​(RandomFunction randomFunction)
    • Method Detail

      • create

        public UUID create()
        Return a Suffix COMB GUID. It combines a creation time with random bits. The creation millisecond is a SUFFIX at the LEAST significant bits.
        Specified by:
        create in interface NoArgsFactory
        Overrides:
        create in class AbstRandomBasedFactory
        Returns:
        a random-based UUID