Flake4J ID Generator

A Java implementation of the Flake decentralized, k-ordered ID generation algorithm by Boundary

Лицензия

Лицензия

Группа

Группа

com.github.charithe
Идентификатор

Идентификатор

flake4j
Последняя версия

Последняя версия

1.0.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

Flake4J ID Generator
A Java implementation of the Flake decentralized, k-ordered ID generation algorithm by Boundary
Ссылка на сайт

Ссылка на сайт

https://github.com/charithe/flake4j
Система контроля версий

Система контроля версий

https://github.com/charithe/flake4j

Скачать flake4j

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.github.charithe/flake4j/ -->
<dependency>
    <groupId>com.github.charithe</groupId>
    <artifactId>flake4j</artifactId>
    <version>1.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.charithe/flake4j/
implementation 'com.github.charithe:flake4j:1.0.2'
// https://jarcasting.com/artifacts/com.github.charithe/flake4j/
implementation ("com.github.charithe:flake4j:1.0.2")
'com.github.charithe:flake4j:jar:1.0.2'
<dependency org="com.github.charithe" name="flake4j" rev="1.0.2">
  <artifact name="flake4j" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.charithe', module='flake4j', version='1.0.2')
)
libraryDependencies += "com.github.charithe" % "flake4j" % "1.0.2"
[com.github.charithe/flake4j "1.0.2"]

Зависимости

test (2)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12
com.googlecode.junit-toolbox : junit-toolbox jar 2.2

Модули Проекта

Данный проект не имеет модулей.

Flake4J - Flake ID generator for Java

This is an implementation of the Flake decentralized, k-ordered ID generation algorithm by Boundary.

There is no server implementation yet. To avoid non-unique IDs, it is the programmer's responsibility to ensure that only one instance of the ID generator is active in a single node (if the MAC address based node identification is used).

This implementation generates 128-bit IDs.

Usage

Artifacts are available on Maven Central.

Gradle:

compile group: 'com.github.charithe', name: 'flake4j', version: '1.0.2'
// Create an ID generator that uses the machine's MAC address for node identification
Flake4J f4j = Flake4J.newInstance();

// Use a custom node identifier instead of the MAC address
NodeIdentifier nodeIdentifier = () -> uniqueNodeIdentifier // long value
Flake4J f4j = Flake4J.newInstance(nodeIdentifier);

Версии библиотеки

Версия
1.0.2
1.0.1
1.0.0