Class ByteArrayKeyEncoder

java.lang.Object
com.scaleout.client.caching.KeyEncoder<byte[]>
com.scaleout.client.caching.ByteArrayKeyEncoder

public class ByteArrayKeyEncoder extends KeyEncoder<byte[]>
The ByteArrayKeyEncoder is an implementation of a KeyEncoder for Byte keys compatible with the SOSS-JNC API.
  • Constructor Details

    • ByteArrayKeyEncoder

      public ByteArrayKeyEncoder()
      Constructs a KeyEncoder implementation for byte[] keys.
  • Method Details

    • fromBytes

      public byte[] fromBytes(byte[] keyAsBytes)
      Returns the original byte[] key.
      Specified by:
      fromBytes in class KeyEncoder<byte[]>
      Parameters:
      keyAsBytes - the 32 byte encoded key.
      Returns:
      the byte[] key.
    • encode

      public KeyEncodingResult encode(byte[] key)
      Encodes the byte[] key.
      Specified by:
      encode in class KeyEncoder<byte[]>
      Parameters:
      key - the byte[] key.
      Returns:
      the KeyEncodingResult.