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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getStringMapping(java.lang.Object key)
Must return an unique String for the supplied key.boolean
isSupportedType(java.lang.Class<?> keyType)
Do we support this key type?
-
-
-
Method Detail
-
isSupportedType
boolean isSupportedType(java.lang.Class<?> keyType)
Do we support this key type?- Parameters:
keyType
- type to test- Returns:
- true if the type is supported, false otherwise.
-
getStringMapping
java.lang.String getStringMapping(java.lang.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
-
-