Commit Graph

106 Commits

Author SHA1 Message Date
Fabio Lima f13a0c23ed
Update README.md 2021-09-18 02:59:58 -03:00
Fabio Lima 11dd761d76 [maven-release-plugin] prepare for next development iteration 2021-09-04 02:01:46 -03:00
Fabio Lima 77a71e9cc1 [maven-release-plugin] prepare release ulid-creator-4.1.0 2021-09-04 02:01:46 -03:00
Fabio Lima 132ab99b77 Provide OSGI support #16
Added OSGi entries to `MANIFEST.MF`:

```
Bundle-ManifestVersion: 2
Bundle-Name: ulid-creator
Bundle-SymbolicName: com.github.f4b6a3.ulid
Bundle-Version: 4.1.0
Export-Package: com.github.f4b6a3.ulid
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"
```

The OSGi symbolic name is the same as the root package name:
`com.github.f4b6a3.ulid`
2021-09-04 02:00:57 -03:00
Fabio Lima 564c0401c6 [maven-release-plugin] prepare for next development iteration 2021-08-08 01:47:27 -03:00
Fabio Lima f544152fa2 [maven-release-plugin] prepare release ulid-creator-4.0.0 2021-08-08 01:47:27 -03:00
Fabio Lima 27a4f60cb5 Version 4.0.0 #15
Now you call `UlidFactory.newInstance()` and it's variants to get a new
`UlidFactory`.

List of changes:

- Added `UlidFactory.newInstance()`
- Added `UlidFactory.newInstance(Random)`
- Added `UlidFactory.newInstance(Supplier<byte[]>)`
- Added `UlidFactory.newMonotonicInstance()`
- Added `UlidFactory.newMonotonicInstance(Random)`
- Added `UlidFactory.newMonotonicInstance(Supplier<byte[]>)`
- Added benchmark code to compare ULID with UUID
- Removed `DefaultFactory`
- Removed `MonotonicFactory`
- Removed `Ulid.toUpperCase()`
- Removed `RandomGenerator`
2021-08-08 01:35:40 -03:00
Fabio Lima 8a68ad617e Merge branch 'master' of https://github.com/f4b6a3/ulid-creator 2021-07-25 17:55:54 -03:00
Fabio Lima cd849c4e21 Add benchmark code to compare ULID with UUID #14
The benchmark code was created in the direcory `benchmark`.

To execute the benchmark, run the script `./benchmark/run.sh`.

Sorry, there is no `run.bat` file for Windows.
2021-07-25 17:55:29 -03:00
Fabio Lima b29807d831
Update CHANGELOG.md 2021-07-18 01:57:23 -03:00
Fabio Lima 0152fe3084 [maven-release-plugin] prepare for next development iteration 2021-07-18 01:49:58 -03:00
Fabio Lima 3e557ffc29 [maven-release-plugin] prepare release ulid-creator-3.2.0 2021-07-18 01:49:57 -03:00
Fabio Lima 0f431d01b1 Add constructors in UlidFactory for random generators #12
New constructors:

- public UlidFactory(Random random) { }
- public UlidFactory(RandomGenerator randomGenerator) { }
2021-07-18 01:21:41 -03:00
Fabio Lima 0e1fe3f162 Merge branch 'master' of https://github.com/f4b6a3/ulid-creator 2021-07-17 14:12:47 -03:00
Fabio Lima 89ab0f032e [maven-release-plugin] prepare for next development iteration 2021-07-17 14:07:18 -03:00
Fabio Lima db6defb90f [maven-release-plugin] prepare release ulid-creator-3.1.1 2021-07-17 14:07:18 -03:00
Fabio Lima d3277fe372 Module name for Java 9+ #11
Add this line to MANIFEST.MF:

Automatic-Module-Name: com.github.f4b6a3.ulid
2021-07-17 14:02:34 -03:00
Fabio Lima e3f6e61f6b
Update CHANGELOG.md 2021-02-14 02:28:49 -03:00
Fabio Lima 105a0c7072 [maven-release-plugin] prepare for next development iteration 2021-02-13 20:23:45 -03:00
Fabio Lima e6bc8081d8 [maven-release-plugin] prepare release ulid-creator-3.1.0 2021-02-13 20:23:45 -03:00
Fabio Lima d739278138 Add a changelog file #10
Added CHANGELOG.md
2021-02-13 20:21:06 -03:00
Fabio Lima 1dffbf1ebb Add static methods for extracting time and random components #9
Add static methods to Ulid:
 - Ulid.getInstant(String);
 - Ulid.getTime(String);
 - Ulid.getRandom(String);

List of changes:

Updated Ulid
Updated test cases
Updated README.md

Test coverage 99.4%
2021-02-13 20:14:31 -03:00
Fabio Lima b5b262be42 Merge branch 'master' of https://github.com/f4b6a3/ulid-creator 2021-02-04 02:07:11 -03:00
Fabio Lima 3f10989f74 [maven-release-plugin] prepare for next development iteration 2021-02-04 02:06:28 -03:00
Fabio Lima 58e111c841 [maven-release-plugin] prepare for next development iteration 2021-01-30 09:29:46 -03:00
Fabio Lima 9a3ca63ad6 [maven-release-plugin] prepare release ulid-creator-3.0.1 2021-01-30 09:29:46 -03:00
Fabio Lima 4df6fbfa9b Development of version 3.0.0 #7
renamed subpackage 'creator' to 'factory'
2021-01-30 09:29:08 -03:00
Fabio Lima fc9aa7742e [maven-release-plugin] prepare for next development iteration 2021-01-30 07:18:40 -03:00
Fabio Lima ad93e0207b [maven-release-plugin] prepare release ulid-creator-3.0.0 2021-01-30 07:18:40 -03:00
Fabio Lima f1eaebd3bd Development of version 3.0.0 #7
continuing...

List of changes:

Improve Ulid
Create UlidFactory
Create DefaultUlidFactory
Create MonotonicUlidFactory
Improve UlidTest
Create UlidFactoryTest
Create DefaultUlidFactoryTest
Create MonotonicUlidFactoryTest
Update UniquenessTest
Update README.md
Update javadoc

Test coverage: 99.3%
2021-01-30 07:17:09 -03:00
Fabio Lima 3aa29be465 Development of version 3.0.0 #7
Continuing...

Improve Ulid
Simplify UlidSpecCreator
Simplify MonotonicUlidSpecCreator
Remove OtherRandomStrategy
Remove UlidValidator
Update test cases
2021-01-25 02:19:08 -03:00
Fabio Lima ef2842bfe8 Development of version 3.0.0 #7
Continuing...

List of changes:

Improved Ulid
Improved UlidCrator
Improved UlidSpecCreator
Improved DefaultUlidSpecCreator
Improved MonotonicUlidSpecCreator
Removed TimestampStrategy
Removed DefaultTimestampStrategy
Removed FixedTimestampStrategy
Updated testa cases
2021-01-24 16:33:11 -03:00
Fabio Lima 2ffa7a95dd Development of version 3.0.0 #7
Changed the uuid-creator to generate two types of ULID: default
(non-monotonic) and monotonic.

Until version 2.x.x this library only created monotonic ULIDs.

The version 3.0.0 breaks compatibility.

List of changes:

Changed UlidCreator
Created Ulid
Created UlidSpecCreator // abstract
Created DefaultUlidSpecCreator // implementation
Created MonotonicUlidSpecCreator // implementation
Removed UlidConverter
Removed UlidUtil
Removed UlidStruct
Create and update test cases
and more...

Test coverage: 93.5%
2021-01-24 00:08:24 -03:00
Fabio Lima 5289a469b2 [maven-release-plugin] prepare for next development iteration 2020-11-16 01:40:36 -03:00
Fabio Lima 3f3484bfce [maven-release-plugin] prepare release ulid-creator-2.3.3 2020-11-16 01:40:36 -03:00
Fabio Lima e52b2cdefd Add test cases, and remove unused code
List of changes:

Change UlidUtil // remove unused code
Change UlidUtilTest // add tests and remove unused code
Change UlidStructTest // add tests
Change UlidValidator // add methods for char[] args
Optimaze UlidSpecCreator // small optimization
Optimaze UlidStruct // small optimization
Update README.md
2020-11-16 01:39:52 -03:00
Fabio Lima e4a3558595 [maven-release-plugin] prepare for next development iteration 2020-11-09 04:39:23 -03:00
Fabio Lima 0498859143 [maven-release-plugin] prepare release ulid-creator-2.3.2 2020-11-09 04:39:23 -03:00
Fabio Lima 1bee3ba042 Optimization of the ULID string validation
It's not needed to parse the whole ULID timestamp. All is needed is to
check the first two bits. They are extra bits added by the base-32
encoding. Both bits must be ZERO.
2020-11-09 04:27:20 -03:00
Fabio Lima 1b47994150 [maven-release-plugin] prepare for next development iteration 2020-11-08 17:42:05 -03:00
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