RelOps Snowflake

A source of k-ordered unique 64-bit integers.

License

License

GroupId

GroupId

com.relops
ArtifactId

ArtifactId

snowflake
Last Version

Last Version

1.1
Release Date

Release Date

Type

Type

jar
Description

Description

RelOps Snowflake
A source of k-ordered unique 64-bit integers.
Project URL

Project URL

http://github.com/relops/snowflake
Source Code Management

Source Code Management

https://github.com/relops/snowflake

Download snowflake

How to add to project

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

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

Snowflake

A snowflake is a source of k-ordered unique 64-bit integers.

This is a Java library for generating ids in an un-coordinated setting:

int node = 1;
Snowflake s = new Snowflake(node);
long id = s.next();

The node id is a manually assigned value between 0 and 1023 which is used to differentiate different snowflakes when used in a multi-node cluster.

To include this as a library, you can use the following Maven dependency:

<dependency>
    <groupId>com.relops</groupId>
    <artifactId>snowflake</artifactId>
    <version>1.1</version>
</dependency>
com.relops

RelOps Ltd

Versions

Version
1.1