com.github.drinkjava2.jdialects.annotation.jdia
Annotation Type Snowflake


@Target(value=FIELD)
@Retention(value=RUNTIME)
public @interface Snowflake

Mark a Long type column value build by using SnowFlake algorithm from twitter
In jDialects SnowFlake algorithm source code originated from: https://github.com/downgoon/snowflake The SnowFlake algorithm follows below basic rule:
1 bit const=0
41 bits Timestamp based on machine
10 bits Confighured by user, used as machine ID, an example is assign 5 bits for dataCenterID + 5 bits for workerID
12 bits Sequence number



Copyright © 2018. All rights reserved.