Skip to content

Commit b11ce62

Browse files
committed
Restore LongHashFunction.xx_r39() to allow consumers to migrate to xx()
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.
1 parent 008585e commit b11ce62

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

src/main/java/net/openhft/hashing/LongHashFunction.java

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,32 @@ public static LongHashFunction xx(long seed) {
284284
return XxHash.asLongHashFunctionWithSeed(seed);
285285
}
286286

287+
/**
288+
* Returns a hash function implementing the <a href="https://github.com/Cyan4973/xxHash">xxHash
289+
* algorithm</a> without a seed value (0 is used as default seed value). This implementation
290+
* produces equal results for equal input on platforms with different {@link
291+
* ByteOrder}, but is slower on big-endian platforms than on little-endian.
292+
*
293+
* @deprecated use {link #xx()} instead; this method exists for backwards compatibility.
294+
*/
295+
@Deprecated
296+
public static LongHashFunction xx_r39() {
297+
return XxHash.asLongHashFunctionWithoutSeed();
298+
}
299+
300+
/**
301+
* Returns a hash function implementing the <a href="https://github.com/Cyan4973/xxHash">xxHash
302+
* algorithm</a> with the given seed value. This implementation produces equal results for equal
303+
* input on platforms with different {@link ByteOrder}, but is slower on big-endian platforms
304+
* than on little-endian.
305+
*
306+
* @deprecated use {link #xx(long)} instead; this method exists for backwards compatibility.
307+
*/
308+
@Deprecated
309+
public static LongHashFunction xx_r39(long seed) {
310+
return XxHash.asLongHashFunctionWithSeed(seed);
311+
}
312+
287313
/**
288314
* Returns a hash function implementing the <a href="https://github.com/Cyan4973/xxHash">XXH3 64bit
289315
* algorithm</a> without a seed value (0 is used as default seed value). This implementation

0 commit comments

Comments
 (0)