Interface Key2StringMapper

All Known Subinterfaces:
MarshallingTwoWayKey2StringMapper, TwoWayKey2StringMapper
All Known Implementing Classes:
DefaultTwoWayKey2StringMapper, WrappedByteArrayOrPrimitiveMapper

public interface Key2StringMapper
Defines the logic of mapping a key object to a String. This is required by certain cache stores, in order to map each key to a String which the underlying store is capable of handling. It should generate a unique String based on the supplied key.
Author:
Mircea.Markus@jboss.com, Manik Surtani
  • Method Summary

    Modifier and Type
    Method
    Description
    Must return an unique String for the supplied key.
    boolean
    isSupportedType(Class<?> keyType)
    Do we support this key type?
  • Method Details

    • isSupportedType

      boolean isSupportedType(Class<?> keyType)
      Do we support this key type?
      Parameters:
      keyType - type to test
      Returns:
      true if the type is supported, false otherwise.
    • getStringMapping

      String getStringMapping(Object key)
      Must return an unique String for the supplied key.
      Parameters:
      key - key to map to a String
      Returns:
      String representation of the key