Package com.scaleout.client.caching
Class ByteArrayKeyEncoder
java.lang.Object
com.scaleout.client.caching.KeyEncoder<byte[]>
com.scaleout.client.caching.ByteArrayKeyEncoder
The
ByteArrayKeyEncoder
is an implementation of a KeyEncoder
for Byte
keys compatible with the SOSS-JNC API.-
Constructor Summary
-
Method Summary
-
Constructor Details
-
ByteArrayKeyEncoder
public ByteArrayKeyEncoder()Constructs aKeyEncoder
implementation for byte[] keys.
-
-
Method Details
-
fromBytes
public byte[] fromBytes(byte[] keyAsBytes) Returns the original byte[] key.- Specified by:
fromBytes
in classKeyEncoder<byte[]>
- Parameters:
keyAsBytes
- the 32 byte encoded key.- Returns:
- the byte[] key.
-
encode
Encodes the byte[] key.- Specified by:
encode
in classKeyEncoder<byte[]>
- Parameters:
key
- thebyte[]
key.- Returns:
- the
KeyEncodingResult
.
-