{"id":16119494,"url":"https://github.com/downgoon/snowflake","last_synced_at":"2025-05-09T01:46:36.260Z","repository":{"id":57743969,"uuid":"103717555","full_name":"downgoon/snowflake","owner":"downgoon","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.","archived":false,"fork":false,"pushed_at":"2018-10-12T07:34:49.000Z","size":312,"stargazers_count":122,"open_issues_count":2,"forks_count":45,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-09T01:46:28.414Z","etag":null,"topics":["auto-increment","id-generator","sequence","snowflake","unique-id","uuid"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/downgoon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-16T02:17:19.000Z","updated_at":"2025-01-15T05:35:55.000Z","dependencies_parsed_at":"2022-08-31T09:31:30.634Z","dependency_job_id":null,"html_url":"https://github.com/downgoon/snowflake","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/downgoon%2Fsnowflake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/downgoon%2Fsnowflake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/downgoon%2Fsnowflake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/downgoon%2Fsnowflake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/downgoon","download_url":"https://codeload.github.com/downgoon/snowflake/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253176443,"owners_count":21866142,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["auto-increment","id-generator","sequence","snowflake","unique-id","uuid"],"created_at":"2024-10-09T20:54:18.052Z","updated_at":"2025-05-09T01:46:36.174Z","avatar_url":"https://github.com/downgoon.png","language":"Java","funding_links":[],"categories":["分布式开发"],"sub_categories":[],"readme":"# Snowflake\n\njava edition of [Twitter Snowflake](https://github.com/twitter/snowflake), a network service for generating unique ID numbers at high scale with some simple guarantees.\n\n## QuickStart\n\n- import maven dependency\n\n``` xml\n\u003cdependency\u003e\n  \u003cgroupId\u003exyz.downgoon\u003c/groupId\u003e\n  \u003cartifactId\u003esnowflake\u003c/artifactId\u003e\n  \u003cversion\u003e1.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n- sample code\n\n``` java\n// datacenter: 2; workerId: 5\nSnowflake snowflake = new Snowflake(2, 5);\nlong id1 = snowflake.nextId();\nlong id2 = snowflake.nextId();\n\nsnowflake.formatId(id1);\n```\n\nfor more details, please read [SnowflakeDemo2.java](src/test/java/xyz/downgoon/snowflake/SnowflakeDemo2.java).\n\n## snowflake tutorial\n\n- [snowflake tutorial](docs/SnowflakeTutorial_zh_CN.md)：中文教程\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdowngoon%2Fsnowflake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdowngoon%2Fsnowflake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdowngoon%2Fsnowflake/lists"}