类 UidGenerator


  • public class UidGenerator
    extends java.lang.Object
    • 构造器概要

      构造器 
      构造器 说明
      UidGenerator​(int sequenceBits, int typeBits, int workerIdBits, int datacenterIdBits, long type, long workerId, long datacenterId)  
      UidGenerator​(long type, long workerId, long datacenterId)  
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      long nextId()  
      UidInfo parse​(long uid)  
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 构造器详细资料

      • UidGenerator

        public UidGenerator​(long type,
                            long workerId,
                            long datacenterId)
        参数:
        type - type
        workerId - workerId
        datacenterId - datacenterId
        Description:
        Date:
        2022-12-11 16:19
        Title:
        UidGenerator
      • UidGenerator

        public UidGenerator​(int sequenceBits,
                            int typeBits,
                            int workerIdBits,
                            int datacenterIdBits,
                            long type,
                            long workerId,
                            long datacenterId)
        参数:
        sequenceBits - sequenceBits
        typeBits - typeBits
        workerIdBits - workerIdBits
        datacenterIdBits - datacenterIdBits
        type - type
        workerId - workerId
        datacenterId - datacenterId
        Description:
        Date:
        2022-12-11 16:20
        Title:
        UidGenerator
    • 方法详细资料

      • nextId

        public long nextId()
        返回:
        long
        Description:
        Date:
        2022-12-13 00:39
        Title:
        nextId
      • parse

        public UidInfo parse​(long uid)
        参数:
        uid - uid
        返回:
        io.github.kylinhunter.commons.uid.UidInfo
        Description:
        Date:
        2022-12-11 16:30
        Title:
        parse