An unique ID player, who use several mechanisms to generate unique ID ( Some maybe only unique in a limited scope of time ).
- Unique IDs are required by nearly all distributed systems.
- There are so many mechanisms, which you can play with. In this repo, we use a uniform API and multi-implementations, you can choose and switch any of them as you wish.
- coming soon
- Get the
UniqueIDPlayer
instance, and get ids bynextStringId()
ornextLongId()
.
UniqueIDPlayer player = UniqueIDPlayer.newBuilder().find("IDGeneratorName");
- Use named
uniqueid.player.config
config file, and use defaultfind()
UniqueIDPlayer player = UniqueIDPlayer.newBuilder().find();
__see sample config file at here