Class UncertaintyIdGenerator

java.lang.Object
me.ahoo.cosid.uncertainty.UncertaintyIdGenerator
All Implemented Interfaces:
Decorator<IdGenerator>, IdGenerator, IdGeneratorDecorator, Statistical, StringIdGenerator

@Beta public class UncertaintyIdGenerator extends Object implements IdGeneratorDecorator
Uncertainty ID Generator. For the following usage scenarios:
     1. The problem of uneven sharding of snowflake IDs.
     2. I don’t want the generated ID to be predictable, such as preventing crawler by ID number, predicting transaction volume.
 
  • Field Details

  • Constructor Details

    • UncertaintyIdGenerator

      public UncertaintyIdGenerator(IdGenerator actual, int uncertaintyBits)
  • Method Details