Package com.scaleout.client.caching
Class LegacyStringKeyEncoder
The
LegacyStringKeyEncoder
is an implementation of a KeyEncoder
for String
keys compatible
with the SOSS-JNC API.-
Constructor Summary
ConstructorDescriptionLegacyStringKeyEncoder
(StringKeyCache stringKeyCache) Construct aKeyEncoder
forString
keys compatible with the SOSS-JNC API. -
Method Summary
Modifier and TypeMethodDescriptionEncodes theString
key into aKeyEncodingResult
with a unicode encoded key string.fromBytes
(byte[] keyAsBytes) Retrieves a Unicode string from the 32-byte encoded key string.
-
Constructor Details
-
LegacyStringKeyEncoder
Construct aKeyEncoder
forString
keys compatible with the SOSS-JNC API.- Parameters:
stringKeyCache
- the string key cache.
-
-
Method Details
-
fromBytes
Retrieves a Unicode string from the 32-byte encoded key string.- Specified by:
fromBytes
in classKeyEncoder<String>
- Parameters:
keyAsBytes
- the 32 byte encoded key- Returns:
- the key string
-
encode
Encodes theString
key into aKeyEncodingResult
with a unicode encoded key string.- Specified by:
encode
in classKeyEncoder<String>
- Parameters:
key
- theInteger
key- Returns:
- the
KeyEncodingResult
-