Class DataConversion

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

public final class DataConversion extends Object
Handle conversions for Keys or values.
Since:
9.2
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final DataConversion
    Deprecated, for removal: This API element is subject to removal in a future version.
    Since 11.0.
    static final DataConversion
    Deprecated, for removal: This API element is subject to removal in a future version.
    Since 11.0.
    static final DataConversion
    Deprecated, for removal: This API element is subject to removal in a future version.
    Since 11.0.
    static final DataConversion
    Deprecated, for removal: This API element is subject to removal in a future version.
    Since 11.0.
  • Method Summary

    Modifier and Type
    Method
    Description
    convert(Object o, org.infinispan.commons.dataconversion.MediaType from, org.infinispan.commons.dataconversion.MediaType to)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Since 11.0, with no replacement.
    convertToRequestFormat(Object o, org.infinispan.commons.dataconversion.MediaType contentType)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Since 11.0, with no replacement.
    boolean
     
    Convert the stored object in a format suitable to be indexed.
     
    org.infinispan.commons.dataconversion.Encoder
     
    Class<? extends org.infinispan.commons.dataconversion.Encoder>
     
    org.infinispan.commons.dataconversion.MediaType
     
    org.infinispan.commons.dataconversion.MediaType
     
    org.infinispan.commons.dataconversion.Wrapper
    Deprecated, for removal: This API element is subject to removal in a future version.
    Since 11.0.
    Class<? extends org.infinispan.commons.dataconversion.Wrapper>
    Deprecated, for removal: This API element is subject to removal in a future version.
    Since 11.0.
    int
     
    boolean
    isConversionSupported(org.infinispan.commons.dataconversion.MediaType mediaType)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Since 11.0, with no replacement.
     
    newKeyDataConversion(Class<? extends org.infinispan.commons.dataconversion.Encoder> encoderClass, Class<? extends org.infinispan.commons.dataconversion.Wrapper> wrapperClass)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Since 11.0.
     
    newValueDataConversion(Class<? extends org.infinispan.commons.dataconversion.Encoder> encoderClass, Class<? extends org.infinispan.commons.dataconversion.Wrapper> wrapperClass)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Since 11.0.
    void
    overrideWrapper(Class<? extends org.infinispan.commons.dataconversion.Wrapper> newWrapper, ComponentRegistry cr)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Since 11.0, will be removed with no replacement
     
    toStorage(Object toStore)
     
     
    withEncoding(Class<? extends org.infinispan.commons.dataconversion.Encoder> encoderClass)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Since 12.1, to be removed in a future version.
    withRequestMediaType(org.infinispan.commons.dataconversion.MediaType requestMediaType)
     
    withWrapping(Class<? extends org.infinispan.commons.dataconversion.Wrapper> wrapperClass)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Since 11.0.
    static void
    writeTo(ObjectOutput output, DataConversion dataConversion)
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • DEFAULT_KEY

      @Deprecated(forRemoval=true, since="11.0") public static final DataConversion DEFAULT_KEY
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 11.0. To be removed in 14.0, with no replacement.
    • DEFAULT_VALUE

      @Deprecated(forRemoval=true, since="11.0") public static final DataConversion DEFAULT_VALUE
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 11.0. To be removed in 14.0, with no replacement.
    • IDENTITY_KEY

      @Deprecated(forRemoval=true, since="11.0") public static final DataConversion IDENTITY_KEY
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 11.0. To be removed in 14.0. For internal use only.
    • IDENTITY_VALUE

      @Deprecated(forRemoval=true, since="11.0") public static final DataConversion IDENTITY_VALUE
      Deprecated, for removal: This API element is subject to removal in a future version.
      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(forRemoval=true, since="12.1") public DataConversion withEncoding(Class<? extends org.infinispan.commons.dataconversion.Encoder> encoderClass)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 12.1, to be removed in a future version.
    • withWrapping

      @Deprecated(forRemoval=true, since="11.0") public DataConversion withWrapping(Class<? extends org.infinispan.commons.dataconversion.Wrapper> wrapperClass)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 11.0. To be removed in 14.0, with no replacement.
    • overrideWrapper

      @Deprecated(forRemoval=true, since="11.0") public void overrideWrapper(Class<? extends org.infinispan.commons.dataconversion.Wrapper> newWrapper, ComponentRegistry cr)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 11.0, will be removed with no replacement
    • isConversionSupported

      @Deprecated(forRemoval=true, since="11.0") public boolean isConversionSupported(org.infinispan.commons.dataconversion.MediaType mediaType)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 11.0, with no replacement.
    • convert

      @Deprecated(forRemoval=true, since="11.0") public Object convert(Object o, org.infinispan.commons.dataconversion.MediaType from, org.infinispan.commons.dataconversion.MediaType to)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 11.0, with no replacement.
    • convertToRequestFormat

      @Deprecated(forRemoval=true, since="11.0") public Object convertToRequestFormat(Object o, org.infinispan.commons.dataconversion.MediaType contentType)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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(forRemoval=true, since="11.0") public org.infinispan.commons.dataconversion.Wrapper getWrapper()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 11.0. To be removed in 14.0, with no replacement.
    • getEncoderClass

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

      @Deprecated(forRemoval=true, since="11.0") public Class<? extends org.infinispan.commons.dataconversion.Wrapper> getWrapperClass()
      Deprecated, for removal: This API element is subject to removal in a future version.
      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(forRemoval=true, since="11.0") public static DataConversion newKeyDataConversion(Class<? extends org.infinispan.commons.dataconversion.Encoder> encoderClass, Class<? extends org.infinispan.commons.dataconversion.Wrapper> wrapperClass)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 11.0. To be removed in 14.0. Replaced by newKeyDataConversion().
    • newValueDataConversion

      @Deprecated(forRemoval=true, since="11.0") public static DataConversion newValueDataConversion(Class<? extends org.infinispan.commons.dataconversion.Encoder> encoderClass, Class<? extends org.infinispan.commons.dataconversion.Wrapper> wrapperClass)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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