Class CosIdSnowflakeKeyGenerateAlgorithm

java.lang.Object
org.apache.shardingsphere.sharding.cosid.algorithm.keygen.CosIdSnowflakeKeyGenerateAlgorithm
All Implemented Interfaces:
org.apache.shardingsphere.infra.instance.InstanceContextAware, org.apache.shardingsphere.infra.util.spi.type.typed.TypedSPI, KeyGenerateAlgorithm

public final class CosIdSnowflakeKeyGenerateAlgorithm extends Object implements KeyGenerateAlgorithm, org.apache.shardingsphere.infra.instance.InstanceContextAware
CosId snowflake key generate algorithm.
  • Field Details

  • Constructor Details

    • CosIdSnowflakeKeyGenerateAlgorithm

      public CosIdSnowflakeKeyGenerateAlgorithm()
  • Method Details

    • init

      public void init(Properties props)
      Specified by:
      init in interface org.apache.shardingsphere.infra.util.spi.type.typed.TypedSPI
    • setInstanceContext

      public void setInstanceContext(org.apache.shardingsphere.infra.instance.InstanceContext instanceContext)
      Specified by:
      setInstanceContext in interface org.apache.shardingsphere.infra.instance.InstanceContextAware
    • generateKey

      public Comparable<?> generateKey()
      Specified by:
      generateKey in interface KeyGenerateAlgorithm
    • getType

      public String getType()
      Specified by:
      getType in interface org.apache.shardingsphere.infra.util.spi.type.typed.TypedSPI