Commit Graph

127 Commits

Author SHA1 Message Date
Fabio Lima 6f3dc7029b [maven-release-plugin] prepare release ulid-creator-4.2.0 2022-04-21 14:54:19 -03:00
Fabio Lima 745bd55ffc feat: handle clock drift #18
Added drift tolerance of 10 seconds to preserve monotonicity when the
system clock is adjusted by NTP after a small clock drift or when the
system clock jumps back by 1 second due to leap second.

The random component is incremented when the current time:
- is the same as the previous time;
- has moved backwards up to 10 seconds.

The time component is also incremented if the random component is
exceeded, which is quite rare.
2022-04-21 14:53:06 -03:00
Fabio Lima 5abd3f46ff test: handle clock drift #18
move factory tests to the root package.
2022-04-21 14:33:11 -03:00
Fabio Lima 236044af02
Update README.md 2022-03-01 11:16:09 -03:00
Fabio Lima 8a5fc3d093 regular maintenance 2021-12-11 14:04:34 -03:00
Fabio Lima 44bab60674
Update README.md 2021-11-28 23:34:53 -03:00
Fabio Lima bf3b93167b
Update README.md 2021-11-28 23:28:06 -03:00
Fabio Lima 5d46bbf2fc
Update README.md 2021-11-28 23:09:48 -03:00
Fabio Lima e30d0bc974
Update README.md 2021-11-27 02:48:08 -03:00
Fabio Lima e03b50f303
Update README.md 2021-11-27 02:45:30 -03:00
Fabio Lima e23370f5fd
Update README.md 2021-11-27 02:44:09 -03:00
Fabio Lima 4b24b03f8f
Update README.md 2021-11-15 08:19:25 -03:00
Fabio Lima 1cc8ed180e
Update README.md 2021-11-15 07:56:11 -03:00
Fabio Lima f384d26c93 [maven-release-plugin] prepare for next development iteration 2021-11-06 10:10:42 -03:00
Fabio Lima da40af36b5 [maven-release-plugin] prepare release ulid-creator-4.1.2 2021-11-06 10:10:42 -03:00
Fabio Lima ced08d1a55 Compare internal fields as unsigned integers #17 2021-11-06 10:06:14 -03:00
Fabio Lima 200c0e1dbb [maven-release-plugin] prepare for next development iteration 2021-10-03 23:12:05 -03:00
Fabio Lima aeaf58e4d3 [maven-release-plugin] prepare release ulid-creator-4.1.1 2021-10-03 23:12:05 -03:00
Fabio Lima 7b4abe0f9c Merge branch 'master' of https://github.com/f4b6a3/ulid-creator 2021-10-03 23:11:26 -03:00
Fabio Lima e83a2fcf82 regular maintenance
Improve code quality after Codacy.com analysis.

Site: https://app.codacy.com
2021-10-02 09:31:19 -03:00
Fabio Lima 559a4a5259
Create file 'benchmark/run.bat' 2021-09-18 03:00:50 -03:00
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