B
- the type of BytesStore
that this function can compute hash values for.public interface BytesStoreHash<B extends BytesStore> extends ToLongFunction<B>
BytesStore
.
This interface provides static methods for computing 32-bit and 64-bit hash values,
using either optimized or vanilla implementations.Modifier and Type | Method and Description |
---|---|
long |
applyAsLong(BytesStore<?,?> bytes,
long length)
Computes a 64-bit hash value of the given
BytesStore with a specified length. |
static long |
hash(@NotNull BytesStore<?,?> b)
Computes a 64-bit hash value of the given
BytesStore . |
static long |
hash(@NotNull BytesStore<?,?> b,
long length)
Computes a 64-bit hash value of the given
BytesStore with a specified length. |
static int |
hash32(BytesStore<?,?> b)
Computes a 32-bit hash value of the given
BytesStore . |
static int |
hash32(@NotNull BytesStore<?,?> b,
int length)
Computes a 32-bit hash value of the given
BytesStore with a specified length. |
applyAsLong
static long hash(@NotNull @NotNull BytesStore<?,?> b)
BytesStore
.b
- the BytesStore
to compute the hash for.static long hash(@NotNull @NotNull BytesStore<?,?> b, long length) throws IllegalStateException, BufferUnderflowException
BytesStore
with a specified length.b
- the BytesStore
to compute the hash for.length
- the number of bytes to include in the hash computation.BufferUnderflowException
- If the length specified is greater than the available bytes.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
static int hash32(BytesStore<?,?> b)
BytesStore
.b
- the BytesStore
to compute the hash for.static int hash32(@NotNull @NotNull BytesStore<?,?> b, int length) throws IllegalStateException, BufferUnderflowException
BytesStore
with a specified length.b
- the BytesStore
to compute the hash for.length
- the number of bytes to include in the hash computation.BufferUnderflowException
- If the length specified is greater than the available bytes.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
long applyAsLong(BytesStore<?,?> bytes, long length) throws IllegalStateException, BufferUnderflowException
BytesStore
with a specified length.bytes
- the BytesStore
to compute the hash for.length
- the number of bytes to include in the hash computation.BufferUnderflowException
- If the length specified is greater than the available bytes.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 © 2024. All rights reserved.