Interface MediaTypeMarshaller
public interface MediaTypeMarshaller
A marshaller that takes the
MediaType decision to marshall/unmarshall.- Since:
- 15.0
-
Method Summary
Modifier and TypeMethodDescription<T> TbytesToKey(byte[] bytes, org.infinispan.commons.configuration.ClassAllowList allowList) Unmarshall the byte array into the object form.<T> TbytesToValue(byte[] bytes, org.infinispan.commons.configuration.ClassAllowList allowList) Unmarshall the byte array into the object form.org.infinispan.commons.dataconversion.MediaTypeThe decided type for the key.org.infinispan.commons.dataconversion.MediaTypeThe decided type for the values.byte[]keyToBytes(Object key) Transforms the key object to the marshalled form.byte[]valueToBytes(Object value) Transforms the value object to the marshalled form.
-
Method Details
-
getKeyType
org.infinispan.commons.dataconversion.MediaType getKeyType()The decided type for the key.- Returns:
- The media type the marshaller uses for keys.
-
getValueType
org.infinispan.commons.dataconversion.MediaType getValueType()The decided type for the values.- Returns:
- The media type the marshaller uses for values.
-
keyToBytes
Transforms the key object to the marshalled form. The marshalled format respects the define media type for the key.- Parameters:
key- : Key object to marshall.- Returns:
- The byte array representation of the object in the decided key media type.
-
valueToBytes
Transforms the value object to the marshalled form. The marshalled format respects the define media type for the value.- Parameters:
value- : Value object to marshall.- Returns:
- The byte array representation of the object in the decided value media type.
-
bytesToKey
<T> T bytesToKey(byte[] bytes, org.infinispan.commons.configuration.ClassAllowList allowList) Unmarshall the byte array into the object form. The unmarshalling follows the process by the decided key media type.- Parameters:
bytes- : Byte array to unmarshall.allowList- : The allowed list of classes to use during unmarshalling.- Returns:
- The object store in the byte array representation.
-
bytesToValue
<T> T bytesToValue(byte[] bytes, org.infinispan.commons.configuration.ClassAllowList allowList) Unmarshall the byte array into the object form. The unmarshalling follows the process by the decided value media type.- Parameters:
bytes- : Byte array to unmarshall.allowList- : The allowed list of classes to use during unmarshalling.- Returns:
- The object store in the byte array representation.
-