public final class TsidCreator extends Object
public static Tsid getTsid256()
It supports up to 256 nodes.
It can generate up to 16,384 TSIDs per millisecond per node.
The time component can be 1 ms or more ahead of the system time when necessary to maintain monotonicity and generation speed.
The node identifier is random, unless there's a system property `tsidcreator.node` or an environment variable `TSIDCREATOR_NODE` is defined. One of them should be used to embed a machine ID in the generated TSID in order to avoid TSID collisions.
Random component settings:
public static Tsid getTsid1024()
It supports up to 1,024 nodes.
It can generate up to 4,096 TSIDs per millisecond per node.
The time component can be 1 ms or more ahead of the system time when necessary to maintain monotonicity and generation speed.
The node identifier is random, unless there's a system property `tsidcreator.node` or an environment variable `TSIDCREATOR_NODE` is defined. One of them should be used to embed a machine ID in the generated TSID in order to avoid TSID collisions.
Random component settings:
public static Tsid getTsid4096()
It supports up to 4,096 nodes.
It can generate up to 1,024 TSIDs per millisecond per node.
The time component can be 1 ms or more ahead of the system time when necessary to maintain monotonicity and generation speed.
The node identifier is random, unless there's a system property `tsidcreator.node` or an environment variable `TSIDCREATOR_NODE` is defined. One of them should be used to embed a machine ID in the generated TSID in order to avoid TSID collisions.
Random component settings:
Copyright © 2024. All rights reserved.