MCPcopy
hub / github.com/baidu/uid-generator / UidGenerator

Interface UidGenerator

src/main/java/com/baidu/fsg/uid/UidGenerator.java:25–44  ·  view source on GitHub ↗

Represents a unique id generator. @author yutianbao

Source from the content-addressed store, hash-verified

23 * @author yutianbao
24 */
25public interface UidGenerator {
26
27 /**
28 * Get a unique ID
29 *
30 * @return UID
31 * @throws UidGenerateException
32 */
33 long getUID() throws UidGenerateException;
34
35 /**
36 * Parse the UID into elements which are used to generate the UID. <br>
37 * Such as timestamp & workerId & sequence...
38 *
39 * @param uid
40 * @return Parsed info
41 */
42 String parseUID(long uid);
43
44}

Callers 5

doGenerateMethod · 0.65
doGenerateMethod · 0.65
doGenerateMethod · 0.65
doGenerateMethod · 0.65
parseUIDMethod · 0.65

Implementers 2

DefaultUidGeneratorsrc/main/java/com/baidu/fsg/uid/impl/D
CachedUidGeneratorsrc/main/java/com/baidu/fsg/uid/impl/C

Calls

no outgoing calls

Tested by

no test coverage detected