Package org.infinispan.encoding
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
DataConversion.Externalizer
-
Field Summary
Fields Modifier and Type Field Description static DataConversion
DEFAULT_KEY
Deprecated.Since 11.0.static DataConversion
DEFAULT_VALUE
Deprecated.Since 11.0.static DataConversion
IDENTITY_KEY
Deprecated.Since 11.0.static DataConversion
IDENTITY_VALUE
Deprecated.Since 11.0.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Object
convert(Object o, MediaType from, MediaType to)
Deprecated.Since 11.0, with no replacement.Object
convertToRequestFormat(Object o, MediaType contentType)
Deprecated.Since 11.0, with no replacement.boolean
equals(Object o)
Object
extractIndexable(Object stored)
Convert the stored object in a format suitable to be indexed.Object
fromStorage(Object stored)
Encoder
getEncoder()
Class<? extends Encoder>
getEncoderClass()
MediaType
getRequestMediaType()
MediaType
getStorageMediaType()
Wrapper
getWrapper()
Deprecated.Since 11.0.Class<? extends Wrapper>
getWrapperClass()
Deprecated.Since 11.0.int
hashCode()
boolean
isConversionSupported(MediaType mediaType)
Deprecated.Since 11.0, with no replacement.static DataConversion
newKeyDataConversion()
static DataConversion
newKeyDataConversion(Class<? extends Encoder> encoderClass, Class<? extends Wrapper> wrapperClass)
Deprecated.Since 11.0.static DataConversion
newValueDataConversion()
static DataConversion
newValueDataConversion(Class<? extends Encoder> encoderClass, Class<? extends Wrapper> wrapperClass)
Deprecated.Since 11.0.void
overrideWrapper(Class<? extends Wrapper> newWrapper, ComponentRegistry cr)
Deprecated.Since 11.0, will be removed with no replacementstatic DataConversion
readFrom(ObjectInput input)
Object
toStorage(Object toStore)
String
toString()
DataConversion
withEncoding(Class<? extends Encoder> encoderClass)
Deprecated.Since 12.1, to be removed in a future version.DataConversion
withRequestMediaType(MediaType requestMediaType)
DataConversion
withWrapping(Class<? extends Wrapper> wrapperClass)
Deprecated.Since 11.0.static void
writeTo(ObjectOutput output, DataConversion dataConversion)
-
-
-
Field Detail
-
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 Detail
-
withRequestMediaType
public DataConversion withRequestMediaType(MediaType requestMediaType)
-
withEncoding
@Deprecated public DataConversion withEncoding(Class<? extends Encoder> encoderClass)
Deprecated.Since 12.1, to be removed in a future version.
-
withWrapping
@Deprecated public DataConversion withWrapping(Class<? extends Wrapper> wrapperClass)
Deprecated.Since 11.0. To be removed in 14.0, with no replacement.
-
overrideWrapper
@Deprecated public void overrideWrapper(Class<? extends Wrapper> newWrapper, ComponentRegistry cr)
Deprecated.Since 11.0, will be removed with no replacement
-
isConversionSupported
@Deprecated public boolean isConversionSupported(MediaType mediaType)
Deprecated.Since 11.0, with no replacement.
-
convert
@Deprecated public Object convert(Object o, MediaType from, MediaType to)
Deprecated.Since 11.0, with no replacement.
-
convertToRequestFormat
@Deprecated public Object convertToRequestFormat(Object o, MediaType contentType)
Deprecated.Since 11.0, with no replacement.
-
extractIndexable
public Object extractIndexable(Object stored)
Convert the stored object in a format suitable to be indexed.
-
getRequestMediaType
public MediaType getRequestMediaType()
-
getStorageMediaType
public MediaType getStorageMediaType()
-
getEncoder
public Encoder getEncoder()
-
getWrapper
@Deprecated public Wrapper getWrapper()
Deprecated.Since 11.0. To be removed in 14.0, with no replacement.
-
getWrapperClass
@Deprecated public Class<? extends Wrapper> getWrapperClass()
Deprecated.Since 11.0. To be removed in 14.0, with no replacement.
-
newKeyDataConversion
public static DataConversion newKeyDataConversion()
- Returns:
- A new instance with an
IdentityEncoder
and request typeMediaType.APPLICATION_OBJECT
. - Since:
- 11.0
-
newValueDataConversion
public static DataConversion newValueDataConversion()
- Returns:
- A new instance with an
IdentityEncoder
and request typeMediaType.APPLICATION_OBJECT
. - Since:
- 11.0
-
newKeyDataConversion
@Deprecated public static DataConversion newKeyDataConversion(Class<? extends Encoder> encoderClass, Class<? extends Wrapper> wrapperClass)
Deprecated.Since 11.0. To be removed in 14.0. Replaced bynewKeyDataConversion()
.
-
newValueDataConversion
@Deprecated public static DataConversion newValueDataConversion(Class<? extends Encoder> encoderClass, Class<? extends Wrapper> wrapperClass)
Deprecated.Since 11.0. To be removed in 14.0. Replaced bynewValueDataConversion()
.
-
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
-
-