4.12 Module classy_uid

This module contains utilities for constructing unique IDs using various algorithms.

4.12.1 Types

cu_tuple()
-type cu_tuple() :: {classy:site(),
                     non_neg_integer(),
                     pos_integer()}.

Cluster-unique tuple

su_tuple()
-type su_tuple() :: {non_neg_integer(), pos_integer()}.

Site-unique tuple

4.12.2 Functions

cluster_unique_tuple()
-spec cluster_unique_tuple() -> cu_tuple().

Return a tuple similar to classy_uid:site_unique_tuple/0, but also including site id, which makes it unique within the cluster.

Cluster-unique tuples can be used to order events on the originator site, but not globally.

site_unique_tuple()
-spec site_unique_tuple() -> su_tuple().

Return a tuple that is unique within the site (across restarts), but is NOT unique in a cluster.

SeqTuple returned by this function consists of a number of node restarts followed by a erlang:unique_integer.

Site-unique tuples can be used to order events within the site.

JavaScript license information