Skip to content

Commit

Permalink
Restore LongHashFunction.xx_r39() to allow consumers to migrate to xx()
Browse files Browse the repository at this point in the history
Add alias to LongHashFunction.xx() called LongHashFunction.xx_r39() to allow
consumers to migrate code from xx_r39() to xx() without breaking at runtime.

The LongHashFunction.xx_r39() method delegates to LongHashFunction.xx() so it
is identical in behavior. It's marked as deprecated.
  • Loading branch information
zackthehuman committed Dec 20, 2023
1 parent 008585e commit 49d224a
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/main/java/net/openhft/hashing/LongHashFunction.java
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,32 @@ public static LongHashFunction xx(long seed) {
return XxHash.asLongHashFunctionWithSeed(seed);
}

/**
* Returns a hash function implementing the <a href="https://github.com/Cyan4973/xxHash">xxHash
* algorithm</a> without a seed value (0 is used as default seed value). This implementation
* produces equal results for equal input on platforms with different {@link
* ByteOrder}, but is slower on big-endian platforms than on little-endian.
*
* @deprecated use {link #xx()} instead; this method exists for backwards compatibility.
*/
@Deprecated
public static LongHashFunction xx_r39() {
return xx();
}

/**
* Returns a hash function implementing the <a href="https://github.com/Cyan4973/xxHash">xxHash
* algorithm</a> with the given seed value. This implementation produces equal results for equal
* input on platforms with different {@link ByteOrder}, but is slower on big-endian platforms
* than on little-endian.
*
* @deprecated use {link #xx(long)} instead; this method exists for backwards compatibility.
*/
@Deprecated
public static LongHashFunction xx_r39(long seed) {
return xx(seed);
}

/**
* Returns a hash function implementing the <a href="https://github.com/Cyan4973/xxHash">XXH3 64bit
* algorithm</a> without a seed value (0 is used as default seed value). This implementation
Expand Down

0 comments on commit 49d224a

Please sign in to comment.