# snowflake **Repository Path**: liujgop/snowflake ## Basic Information - **Project Name**: snowflake - **Description**: java edition of [Twitter Snowflake](https://github.com/twitter/snowflake), a network service for generating unique ID numbers at high scale with some simple guarantees. - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2020-03-05 - **Last Updated**: 2021-03-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Snowflake java edition of [Twitter Snowflake](https://github.com/twitter/snowflake), a network service for generating unique ID numbers at high scale with some simple guarantees. ## QuickStart - import maven dependency ``` xml xyz.downgoon snowflake 1.0.0 ``` - sample code ``` java // datacenter: 2; workerId: 5 Snowflake snowflake = new Snowflake(2, 5); long id1 = snowflake.nextId(); long id2 = snowflake.nextId(); snowflake.formatId(id1); ``` for more details, please read [SnowflakeDemo2.java](src/test/java/xyz/downgoon/snowflake/SnowflakeDemo2.java). ## snowflake tutorial - [snowflake tutorial](docs/SnowflakeTutorial_zh_CN.md):中文教程