From 49d224a4470727162305edab52aa2691e0e3ada3 Mon Sep 17 00:00:00 2001 From: Zack Mulgrew Date: Wed, 20 Dec 2023 14:28:19 -0800 Subject: [PATCH] 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. --- .../net/openhft/hashing/LongHashFunction.java | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/main/java/net/openhft/hashing/LongHashFunction.java b/src/main/java/net/openhft/hashing/LongHashFunction.java index 1245906..c9e968f 100644 --- a/src/main/java/net/openhft/hashing/LongHashFunction.java +++ b/src/main/java/net/openhft/hashing/LongHashFunction.java @@ -284,6 +284,32 @@ public static LongHashFunction xx(long seed) { return XxHash.asLongHashFunctionWithSeed(seed); } + /** + * Returns a hash function implementing the xxHash + * algorithm 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 xxHash + * algorithm 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 XXH3 64bit * algorithm without a seed value (0 is used as default seed value). This implementation