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

    Modifier and Type
    Method
    Description
    Transforms a String into an Object.
    Transforms an Object into a String.
  • Method Details

    • fromString

      Object fromString(String str)
      Transforms a String into an Object.
      Parameters:
      str - cannot be null
      Returns:
      the Object that is encoded in the given String
    • toString

      String toString(Object obj)
      Transforms an Object into a String.
      Parameters:
      obj - cannot be null
      Returns:
      the String representation of the object