public enum VanillaBytesStoreHash extends Enum<VanillaBytesStoreHash> implements BytesStoreHash<BytesStore>
BytesStoreHash
,
BytesStore
Enum Constant and Description |
---|
INSTANCE
Singleton instance of VanillaBytesStoreHash.
|
Modifier and Type | Field and Description |
---|---|
static int |
K0 |
static int |
K1 |
static int |
K2 |
static int |
K3 |
static int |
M0 |
static int |
M1 |
static int |
M2 |
static int |
M3 |
Modifier and Type | Method and Description |
---|---|
static long |
agitate(long l)
Agitates the given long value to generate a hash value.
|
long |
applyAsLong(@NotNull BytesStore store)
Computes a 64-bit hash value for the given BytesStore.
|
long |
applyAsLong(BytesStore bytes,
long length)
Computes a 64-bit hash value for the given BytesStore.
|
static VanillaBytesStoreHash |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static VanillaBytesStoreHash[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
hash, hash, hash32, hash32
public static final VanillaBytesStoreHash INSTANCE
public static final int K0
public static final int K1
public static final int K2
public static final int K3
public static final int M0
public static final int M1
public static final int M2
public static final int M3
public static VanillaBytesStoreHash[] values()
for (VanillaBytesStoreHash c : VanillaBytesStoreHash.values()) System.out.println(c);
public static VanillaBytesStoreHash valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static long agitate(long l)
l
- The input value.public long applyAsLong(@NotNull @NotNull BytesStore store)
applyAsLong
in interface ToLongFunction<BytesStore>
store
- The BytesStore
to compute the hash for.BufferUnderflowException
- If there is not enough data.net.openhft.chronicle.core.io.ClosedIllegalStateException
- If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException
- If this resource was accessed by multiple threads in an unsafe waypublic long applyAsLong(BytesStore bytes, long length) throws IllegalStateException, BufferUnderflowException
applyAsLong
in interface BytesStoreHash<BytesStore>
bytes
- The BytesStore
to compute the hash for.length
- The number of bytes to process.BufferUnderflowException
- If there is not enough data.net.openhft.chronicle.core.io.ClosedIllegalStateException
- If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException
- If this resource was accessed by multiple threads in an unsafe wayIllegalStateException
Copyright © 2023. All rights reserved.