Package org.infinispan.query
Interface Transformer
- All Known Implementing Classes:
DefaultTransformer
public interface Transformer
Converts objects (cache keys only) to and from their Java types to String representations so that Infinispan can index them.
You need to convert custom types only.
Infinispan transforms boxed primitives, java.lang.String, java.util.UUID, and byte arrays internally.
Implementations must be thread-safe! It is recommended they are also stateless.
- Since:
- 4.0
- Author:
- Manik Surtani
-
Method Summary
-
Method Details
-
fromString
Transforms a String into an Object.- Parameters:
str
- cannot be null- Returns:
- the Object that is encoded in the given String
-
toString
Transforms an Object into a String.- Parameters:
obj
- cannot be null- Returns:
- the String representation of the object
-