org.infinispan.loaders.keymappers
Interface Key2StringMapper

All Known Subinterfaces:
TwoWayKey2StringMapper
All Known Implementing Classes:
DefaultTwoWayKey2StringMapper, LuceneKey2StringMapper

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
 String getStringMapping(Object key)
          Must return an unique String for the supplied key.
 boolean isSupportedType(Class<?> keyType)
          Do we support this key type?
 

Method Detail

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

-->

Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.