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
static DataConversion
DEFAULT_VALUE
static DataConversion
IDENTITY_KEY
static DataConversion
IDENTITY_VALUE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
convert(Object o, org.infinispan.commons.dataconversion.MediaType from, org.infinispan.commons.dataconversion.MediaType to)
Object
convertToRequestFormat(Object o, org.infinispan.commons.dataconversion.MediaType contentType)
boolean
equals(Object o)
Object
extractIndexable(Object stored)
Object
fromStorage(Object stored)
org.infinispan.commons.dataconversion.Encoder
getEncoder()
Class<? extends org.infinispan.commons.dataconversion.Encoder>
getEncoderClass()
org.infinispan.commons.dataconversion.MediaType
getRequestMediaType()
org.infinispan.commons.dataconversion.MediaType
getStorageMediaType()
org.infinispan.commons.dataconversion.Wrapper
getWrapper()
Class<? extends org.infinispan.commons.dataconversion.Wrapper>
getWrapperClass()
int
hashCode()
void
injectDependencies(GlobalConfiguration gcr, EncoderRegistry encoderRegistry, Configuration configuration)
boolean
isConversionSupported(org.infinispan.commons.dataconversion.MediaType mediaType)
boolean
isStorageFormatFilterable()
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)
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)
void
overrideWrapper(Class<? extends org.infinispan.commons.dataconversion.Wrapper> newWrapper, ComponentRegistry cr)
static DataConversion
readFrom(ObjectInput input)
Object
toStorage(Object toStore)
String
toString()
DataConversion
withEncoding(Class<? extends org.infinispan.commons.dataconversion.Encoder> encoderClass)
DataConversion
withRequestMediaType(org.infinispan.commons.dataconversion.MediaType requestMediaType)
DataConversion
withWrapping(Class<? extends org.infinispan.commons.dataconversion.Wrapper> wrapperClass)
static void
writeTo(ObjectOutput output, DataConversion dataConversion)
-
-
-
Field Detail
-
DEFAULT_KEY
public static final DataConversion DEFAULT_KEY
-
DEFAULT_VALUE
public static final DataConversion DEFAULT_VALUE
-
IDENTITY_KEY
public static final DataConversion IDENTITY_KEY
-
IDENTITY_VALUE
public static final DataConversion IDENTITY_VALUE
-
-
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)
-
injectDependencies
public void injectDependencies(GlobalConfiguration gcr, EncoderRegistry encoderRegistry, Configuration configuration)
-
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()
-
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)
-
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
-
-