![JAR search and dependency download from the Maven repository](/logo.png)
io.geewit.snowflake.UidGenerator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gw-snowflake Show documentation
Show all versions of gw-snowflake Show documentation
A Java Edition Snowflake By Geewit
package io.geewit.snowflake;
import io.geewit.snowflake.exception.UidGenerateException;
/**
* Represents a unique id generator.
*
* @author geewit
*/
public interface UidGenerator {
/**
* Get a unique ID
*
* @return UID
* @throws UidGenerateException
*/
long getUID() throws UidGenerateException;
/**
* Parse the UID into elements which are used to generate the UID.
* Such as timestamp & workerId & sequence...
*
* @param uid
* @return Parsed info
*/
String parseUID(long uid);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy