Package 

Class SnowFlake

  • All Implemented Interfaces:

    
    public class SnowFlake
    
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      SnowFlake()
      SnowFlake(long datacenterId, long machineId)
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      synchronized long nextId() 产生下一个ID
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SnowFlake

        SnowFlake()
      • SnowFlake

        SnowFlake(long datacenterId, long machineId)
    • Method Detail

      • nextId

         synchronized long nextId()

        产生下一个ID