Commit Graph

166 Commits

Author SHA1 Message Date
Fabio Lima d690e3f796 [maven-release-plugin] prepare release ulid-creator-2.3.1 2020-11-08 17:42:04 -03:00
Fabio Lima 75d313c9ed [#6] Move v4 generators to UlidStruct
Moved v4 generators to UlidStruct

List of Changes:

Create UlidStruct.toUuid4()
Create UlidStruct.toString4()
Create UlidCreatorUuidTest // test cases
Create UlidCreatorStringTest // test cases
Add UlidUtil.extractUnixMilliseconds(UUID ulid)
Add UlidUtil.extractUnixMilliseconds(String ulid)
2020-11-08 17:40:50 -03:00
Fabio Lima 686fec9ce8 [maven-release-plugin] prepare for next development iteration 2020-11-08 11:16:27 -03:00
Fabio Lima b554ae9b97 [maven-release-plugin] prepare release ulid-creator-2.3.0 2020-11-08 11:16:27 -03:00
Fabio Lima 73d43dfc41 [#5] Generate ULID compatible with RFC-4122 UUID v4
Now it can generate UUIDs and ULIDs compatible with RFC-4122 UUID v4.

List of Changes:

Created UlidCreator.getUlid4();
Created UlidCreator.getUlidString4();
Updated README.md

Coverage 94.1%
2020-11-08 11:15:22 -03:00
Fabio Lima e846ae9d71 [maven-release-plugin] prepare for next development iteration 2020-11-08 07:56:40 -03:00
Fabio Lima 9c5f39520d [maven-release-plugin] prepare release ulid-creator-2.2.0 2020-11-08 07:56:40 -03:00
Fabio Lima 54cd5c0595 [#4] Optimize the generation of ULID in string format
Now the generation of ULID in string format is 2.5x faster than before.

List of changes:

Optimize UlidSpecCreator
Optimize UlidConverter
Optimize UlidValidator
Create UlidStruct // class for internal use and test cases
Add test cases
Update README.md
Update javadoc

Coverage 94.3%
2020-11-08 07:55:58 -03:00
Fabio Lima b8741f56df Merge branch 'master' of https://github.com/f4b6a3/ulid-creator 2020-10-17 21:53:53 -03:00
Fabio Lima 20aeb581cc [maven-release-plugin] prepare for next development iteration 2020-10-17 21:51:39 -03:00
Fabio Lima fcb6989918 [maven-release-plugin] prepare release ulid-creator-2.1.0 2020-10-17 21:51:39 -03:00
Fabio Lima fdd33556a7 [#3] Remove overrun exception
Remove UlidCreatorException // extremely unlikely to occur overrun

Add UlidCreator.toString() // from UUID to crockford base 32

Change DefaultRandomStrategy // no need for thread local SecureRandom

Update test cases
Update README.md
Update javadoc

Test coverage: 94.2%
2020-10-17 21:50:37 -03:00
Fábio Lima cf7cdbf75a
Merge pull request #2 from f4b6a3/dependabot/maven/junit-junit-4.13.1
Bump junit from 4.12 to 4.13.1
2020-10-17 08:22:19 -03:00
dependabot[bot] 18c333968a
Bump junit from 4.12 to 4.13.1
Bumps [junit](https://github.com/junit-team/junit4) from 4.12 to 4.13.1.
- [Release notes](https://github.com/junit-team/junit4/releases)
- [Changelog](https://github.com/junit-team/junit4/blob/main/doc/ReleaseNotes4.12.md)
- [Commits](https://github.com/junit-team/junit4/compare/r4.12...r4.13.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-13 19:35:38 +00:00
Fabio Lima 37ffb9e6ba [maven-release-plugin] prepare for next development iteration 2020-07-06 23:31:14 -03:00
Fabio Lima 8d66ded55f [maven-release-plugin] prepare release ulid-creator-2.0.2 2020-07-06 23:31:13 -03:00
Fabio Lima 24a2d4ce13 ...
A time out occured while publishing version 2.0.1 to maven central.

The version 2.0.2 will be created to try again.
2020-07-06 23:30:18 -03:00
Fabio Lima 3962862107 [maven-release-plugin] prepare for next development iteration 2020-07-06 04:39:28 -03:00
Fabio Lima 1a4f110cd1 [maven-release-plugin] prepare release ulid-creator-2.0.1 2020-07-06 04:39:28 -03:00
Fabio Lima 3929965fe9 Fix increment
Fix UlidSpecCreator.increment()
2020-07-06 04:31:17 -03:00
Fábio Lima 1deb79b52e
Update README.md 2020-07-05 00:50:30 -03:00
Fábio Lima d1b8ba9d07
Update README.md 2020-07-05 00:49:48 -03:00
Fabio Lima 3331ca94c1 [maven-release-plugin] prepare for next development iteration 2020-07-04 12:54:00 -03:00
Fabio Lima 2bdb653763 [maven-release-plugin] prepare release ulid-creator-2.0.0 2020-07-04 12:53:59 -03:00
Fabio Lima 327aa7bc6b Version 2.0.0
Rename UlidBasedGuidCreator to UlidSpecCreator

Add method UlidCreator.fromString()
Add RandomStrategy for UlidSpecCreator
Add DefaultRandomStrategy using thread local SecureRandom
Add OtherRandomStrategy for any instance of Random
Add tests cases

Optimize UlidConverter.fromString()
Optimize UlidConverter.toString()
Optimize UlidValidator.isValid()
Optimize UlidSpecCreator

Update README.md
Update tests cases
2020-07-04 12:37:50 -03:00
Fabio Lima a79edd90e5 [maven-release-plugin] prepare for next development iteration 2020-04-19 20:46:23 -03:00
Fabio Lima d763ce0d13 [maven-release-plugin] prepare release ulid-creator-1.1.1 2020-04-19 20:46:22 -03:00
Fabio Lima 74892d1f7b Updated pom.xml 2020-04-19 20:44:36 -03:00
Fabio Lima 5b27212729 [maven-release-plugin] prepare for next development iteration 2020-04-18 03:41:46 -03:00
Fabio Lima fe01b0d7d6 [maven-release-plugin] prepare release ulid-creator-1.1.0 2020-04-18 03:41:46 -03:00
Fabio Lima e19127ea44 Updated pom.xml 2020-04-18 03:38:11 -03:00
Fabio Lima c59d1c61f0 Preparing v1.1.0 2020-04-18 02:43:18 -03:00
Fabio Lima 1826fd960e Updated UlidBasedGuidCreator 2020-04-08 19:02:25 -03:00
Fabio Lima ffffe2af51 Updated UlidBasedGuidCreator 2020-03-16 00:34:56 -03:00
Fabio Lima eb65ed35b1 Updated pom.xml to use commons
Removed files that are also included in f4b6a3/commons.
2020-03-15 05:17:00 -03:00
Fabio Lima 5415552032 Refactored GuidCreator.java 2020-03-12 03:13:58 -03:00
Fabio Lima 4590f46220 [maven-release-plugin] prepare for next development iteration 2020-02-25 15:43:17 -03:00
Fabio Lima 15ae6320dc [maven-release-plugin] prepare release ulid-creator-1.0.2 2020-02-25 15:43:17 -03:00
Fabio Lima c01a914319 Small optimizations
Optimized methods:
- UlidUtil.fromUuidToUlid()
- UlidUtil.fromUlidToUuid()

Added tests cases:
- UlidUtilTest.testFromUuidToBytes()
- UlidUtilTest.testFromBytesToUuid()
- UlidUtilTest.testToAndFromBytes()

Created classes:
- Benchmarks.java (need to uncomment)
2020-02-25 15:40:35 -03:00
Fabio Lima 1fc0952067 Updated README.md 2020-02-24 04:53:01 -03:00
Fabio Lima da8061af21 Fixed a test case
Fixed test case: testShouldThrowOverflowException()
2020-02-24 02:30:07 -03:00
Fabio Lima 7a0fd0db7a [maven-release-plugin] prepare for next development iteration 2020-02-24 00:06:19 -03:00
Fabio Lima c98a9a2424 [maven-release-plugin] prepare release ulid-creator-1.0.1 2020-02-24 00:06:19 -03:00
Fabio Lima 111592751a Remove method from GuidCreator
The method withoutOverrunException() is not necessary anymore.
2020-02-24 00:03:38 -03:00
Fabio Lima 7ec2a7cc98 Throw exception when 2^80 requests are made
In the previous implementation an exception was thrown when the random
part reached 2^80. It meant that if the first random generated within a
millisecond was (2^80 - 1000), the generator could thrown the exception
when only 1000 requests was made. It was very difficult, but possible.

Now it only occurs in the extremely unlikely event that you manage to
generate more than 2^80 ULIDs within the same millisecond.
2020-02-23 23:55:34 -03:00
Fabio Lima 80f5b6ef3e [maven-release-plugin] prepare for next development iteration 2020-02-23 14:25:39 -03:00
Fabio Lima a9bc396554 [maven-release-plugin] prepare release 1.0.0 2020-02-23 14:25:39 -03:00
Fabio Lima a66c83e103 [maven-release-plugin] prepare for next development iteration 2020-02-23 14:12:35 -03:00
Fabio Lima 5583d1467a [maven-release-plugin] prepare release ulid-creator-1.0.0 2020-02-23 14:12:35 -03:00
Fabio Lima 0051e785b7 Small changes 2020-02-23 14:11:55 -03:00