Releases: intenthq/icicle
v2.0.1
v2.0.0
Icicle 2.0 is here! It isn't actually a major change from previous versions (the APIs from 1.x are mostly preserved), but we have a few breaking changes this time so in line with semver we are bumping the major version. Please make sure you read the below before upgrading to ensure you understand how the changes may effect you!
Changes
Breaking Changes
- A bug was found in the custom epoch that was defined for Icicle, meaning the IDs were wrapping. Whilst this behaviour doesn't mean any of the IDs generated before this point are unusable, it most definitely isn't intended! To fix this, we have updated the custom epoch for Icicle. For users upgrading from 1.x, you will need to follow the instructions below, as otherwise you will risk duplicate IDs. (#16, #17)
- Upgrade to Java 8, allowing us to dispense with a few dependencies (like Guava). (#21) Because Guava is gone, we're using Java 8
Optional
now instead, so this is the main change you'll need to look out for.
Other Changes
Upgrading From 1.x
Custom Epoch Change
If you are upgrading from 1.x, the custom epoch has changed in 2.x. To ensure you don't generate duplicate IDs, you will need to set the custom epoch back to what it was:
RoundRobinRedisPool roundRobinRedisPool = ...;
int maxAttempts = 5; // This is the default
IcicleIdGenerator icicleIdGenerator = new IcicleIdGenerator(roundRobinRedisPool, maxAttempts, 1401277473L);
If you are in a position to recalculate the IDs you have stored, you may find that preferable to this as technically, the old IDs are wrong because they will have wrapped by now. However, it is quite safe to continue using the old epoch - so if you don't have that luxury, don't fear!
Java 8 Optional Instead Of Guava
This library is now built with Java 8. We have swapped all parts of the API that returned Guava's Optional
for Java 8's Optional
.
v1.1.1
v1.1.0
Adds batching to Icicle! You can now request batches of up to 4096 IDs from Icicle in once go saving on latency in communicating with Redis.
v1.0.0
Initial release of Icicle! We'll publish the JARs to Maven Central shortly!