Skip to content

Commit da8d90d

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 896f364 commit da8d90d

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
@@ -260,6 +260,32 @@ public static LongHashFunction xx(long seed) {
260260
return XxHash.asLongHashFunctionWithSeed(seed);
261261
}
262262

263+
/**
264+
* Returns a hash function implementing <a href="https://github.com/Cyan4973/xxHash">xxHash
265+
* algorithm</a> without a seed value (0 is used as default seed value). This implementation
266+
* produces equal results for equal input on platforms with different {@link
267+
* ByteOrder}, but is slower on big-endian platforms than on little-endian.
268+
*
269+
* @deprecated use {link #xx()} instead; this method exists for backwards compatibility.
270+
*/
271+
@Deprecated
272+
public static LongHashFunction xx_r39() {
273+
return XxHash.asLongHashFunctionWithoutSeed();
274+
}
275+
276+
/**
277+
* Returns a hash function implementing <a href="https://github.com/Cyan4973/xxHash">xxHash
278+
* algorithm</a> with the given seed value. This implementation produces equal results for equal
279+
* input on platforms with different {@link ByteOrder}, but is slower on big-endian platforms
280+
* than on little-endian.
281+
*
282+
* @deprecated use {link #xx(long)} instead; this method exists for backwards compatibility.
283+
*/
284+
@Deprecated
285+
public static LongHashFunction xx_r39(long seed) {
286+
return XxHash.asLongHashFunctionWithSeed(seed);
287+
}
288+
263289
/**
264290
* Returns a hash function implementing <a href="https://github.com/Cyan4973/xxHash">XXH3 64bit
265291
* algorithm</a> without a seed value (0 is used as default seed value). This implementation

0 commit comments

Comments
 (0)