Interface AerospikeCacheKeyProcessor
- All Known Implementing Classes:
AerospikeCacheKeyProcessorImpl
public interface AerospikeCacheKeyProcessor
Interface that provides methods used in caching
-
Method Summary
Modifier and TypeMethodDescriptioncalculateHash(byte[] data) Calculate hash based on the given byte array.byte[]Serialize the given key.serializeAndHash(Object key) Serialize the given key and calculate hash based on the serialization result.
-
Method Details
-
serializeAndHash
Serialize the given key and calculate hash based on the serialization result.- Parameters:
key- Object to be serialized and hashed- Returns:
- AerospikeCacheKey instantiated with either a String or a long number
-
serialize
Serialize the given key.The default implementation uses Kryo.
- Parameters:
key- Object to be serialized- Returns:
- byte[]
-
calculateHash
Calculate hash based on the given byte array.The default implementation uses 128 bit Murmur3 hashing.
- Parameters:
data- Byte array to be hashed- Returns:
- AerospikeCacheKey instantiated with either a String or a long number
-