Class DataConversion

java.lang.Object
org.infinispan.encoding.DataConversion

public final class DataConversion extends Object
Handle conversions for Keys or values.
Since:
9.2
  • Field Details

    • DEFAULT_KEY

      @Deprecated public static final DataConversion DEFAULT_KEY
      Deprecated.
      Since 11.0. To be removed in 14.0, with no replacement.
    • DEFAULT_VALUE

      @Deprecated public static final DataConversion DEFAULT_VALUE
      Deprecated.
      Since 11.0. To be removed in 14.0, with no replacement.
    • IDENTITY_KEY

      @Deprecated public static final DataConversion IDENTITY_KEY
      Deprecated.
      Since 11.0. To be removed in 14.0. For internal use only.
    • IDENTITY_VALUE

      @Deprecated public static final DataConversion IDENTITY_VALUE
      Deprecated.
      Since 11.0. To be removed in 14.0. For internal use only.
  • Method Details

    • withRequestMediaType

      public DataConversion withRequestMediaType(org.infinispan.commons.dataconversion.MediaType requestMediaType)
    • withEncoding

      @Deprecated public DataConversion withEncoding(Class<? extends org.infinispan.commons.dataconversion.Encoder> encoderClass)
      Deprecated.
      Since 12.1, to be removed in a future version.
    • withWrapping

      @Deprecated public DataConversion withWrapping(Class<? extends org.infinispan.commons.dataconversion.Wrapper> wrapperClass)
      Deprecated.
      Since 11.0. To be removed in 14.0, with no replacement.
    • overrideWrapper

      @Deprecated public void overrideWrapper(Class<? extends org.infinispan.commons.dataconversion.Wrapper> newWrapper, ComponentRegistry cr)
      Deprecated.
      Since 11.0, will be removed with no replacement
    • isConversionSupported

      @Deprecated public boolean isConversionSupported(org.infinispan.commons.dataconversion.MediaType mediaType)
      Deprecated.
      Since 11.0, with no replacement.
    • convert

      @Deprecated public Object convert(Object o, org.infinispan.commons.dataconversion.MediaType from, org.infinispan.commons.dataconversion.MediaType to)
      Deprecated.
      Since 11.0, with no replacement.
    • convertToRequestFormat

      @Deprecated public Object convertToRequestFormat(Object o, org.infinispan.commons.dataconversion.MediaType contentType)
      Deprecated.
      Since 11.0, with no replacement.
    • fromStorage

      public Object fromStorage(Object stored)
    • toStorage

      public Object toStorage(Object toStore)
    • extractIndexable

      public Object extractIndexable(Object stored)
      Convert the stored object in a format suitable to be indexed.
    • getRequestMediaType

      public org.infinispan.commons.dataconversion.MediaType getRequestMediaType()
    • getStorageMediaType

      public org.infinispan.commons.dataconversion.MediaType getStorageMediaType()
    • getEncoder

      public org.infinispan.commons.dataconversion.Encoder getEncoder()
    • getWrapper

      @Deprecated public org.infinispan.commons.dataconversion.Wrapper getWrapper()
      Deprecated.
      Since 11.0. To be removed in 14.0, with no replacement.
    • getEncoderClass

      public Class<? extends org.infinispan.commons.dataconversion.Encoder> getEncoderClass()
    • getWrapperClass

      @Deprecated public Class<? extends org.infinispan.commons.dataconversion.Wrapper> getWrapperClass()
      Deprecated.
      Since 11.0. To be removed in 14.0, with no replacement.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • newKeyDataConversion

      public static DataConversion newKeyDataConversion()
      Returns:
      A new instance with an IdentityEncoder and request type MediaType.APPLICATION_OBJECT.
      Since:
      11.0
    • newValueDataConversion

      public static DataConversion newValueDataConversion()
      Returns:
      A new instance with an IdentityEncoder and request type MediaType.APPLICATION_OBJECT.
      Since:
      11.0
    • newKeyDataConversion

      @Deprecated public static DataConversion newKeyDataConversion(Class<? extends org.infinispan.commons.dataconversion.Encoder> encoderClass, Class<? extends org.infinispan.commons.dataconversion.Wrapper> wrapperClass)
      Deprecated.
      Since 11.0. To be removed in 14.0. Replaced by newKeyDataConversion().
    • newValueDataConversion

      @Deprecated public static DataConversion newValueDataConversion(Class<? extends org.infinispan.commons.dataconversion.Encoder> encoderClass, Class<? extends org.infinispan.commons.dataconversion.Wrapper> wrapperClass)
      Deprecated.
      Since 11.0. To be removed in 14.0. Replaced by newValueDataConversion().
    • writeTo

      public static void writeTo(ObjectOutput output, DataConversion dataConversion) throws IOException
      Throws:
      IOException
    • readFrom

      public static DataConversion readFrom(ObjectInput input) throws IOException, ClassNotFoundException
      Throws:
      IOException
      ClassNotFoundException