Class DataConversion


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

      • withRequestMediaType

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

        public DataConversion withEncoding​(Class<? extends org.infinispan.commons.dataconversion.Encoder> encoderClass)
      • withWrapping

        public DataConversion withWrapping​(Class<? extends org.infinispan.commons.dataconversion.Wrapper> wrapperClass)
      • overrideWrapper

        public void overrideWrapper​(Class<? extends org.infinispan.commons.dataconversion.Wrapper> newWrapper,
                                    ComponentRegistry cr)
      • isConversionSupported

        public boolean isConversionSupported​(org.infinispan.commons.dataconversion.MediaType mediaType)
      • convert

        public Object convert​(Object o,
                              org.infinispan.commons.dataconversion.MediaType from,
                              org.infinispan.commons.dataconversion.MediaType to)
      • convertToRequestFormat

        public Object convertToRequestFormat​(Object o,
                                             org.infinispan.commons.dataconversion.MediaType contentType)
      • fromStorage

        public Object fromStorage​(Object stored)
      • extractIndexable

        public Object extractIndexable​(Object stored)
      • 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

        public org.infinispan.commons.dataconversion.Wrapper getWrapper()
      • getEncoderClass

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

        public Class<? extends org.infinispan.commons.dataconversion.Wrapper> getWrapperClass()
      • isStorageFormatFilterable

        public boolean isStorageFormatFilterable()
      • hashCode

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

        public static DataConversion newKeyDataConversion​(Class<? extends org.infinispan.commons.dataconversion.Encoder> encoderClass,
                                                          Class<? extends org.infinispan.commons.dataconversion.Wrapper> wrapperClass,
                                                          org.infinispan.commons.dataconversion.MediaType storageType)
      • newValueDataConversion

        public static DataConversion newValueDataConversion​(Class<? extends org.infinispan.commons.dataconversion.Encoder> encoderClass,
                                                            Class<? extends org.infinispan.commons.dataconversion.Wrapper> wrapperClass,
                                                            org.infinispan.commons.dataconversion.MediaType storageType)