Class MarshallerUtil
java.lang.Object
org.infinispan.client.hotrod.marshall.MarshallerUtil
- Author:
- Galder Zamarreño
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Tbytes2obj(Marshaller marshaller, byte[] bytes, boolean objectStorage, ClassAllowList allowList) static <T> Tbytes2obj(Marshaller marshaller, InputStream inputStream, boolean objectStorage, ClassAllowList allowList) static org.infinispan.protostream.SerializationContextgetSerializationContext(RemoteCacheContainer remoteCacheManager) A convenience method to return theSerializationContextassociated with theProtoStreamMarshallerconfigured on the providedRemoteCacheManager.static byte[]obj2bytes(Marshaller marshaller, Object o, boolean isKey, int estimateKeySize, int estimateValueSize) Deprecated, for removal: This API element is subject to removal in a future version.Since 12.0, will be removed in 15.0static byte[]obj2bytes(Marshaller marshaller, Object o, BufferSizePredictor sizePredictor) static voidobj2stream(Marshaller marshaller, Object o, OutputStream stream, BufferSizePredictor sizePredictor) static <T> TtryJavaDeserialize(byte[] bytes, byte[] ret, ClassAllowList allowList)
-
Method Details
-
getSerializationContext
public static org.infinispan.protostream.SerializationContext getSerializationContext(RemoteCacheContainer remoteCacheManager) A convenience method to return theSerializationContextassociated with theProtoStreamMarshallerconfigured on the providedRemoteCacheManager.- Returns:
- the associated
SerializationContext - Throws:
HotRodClientException- if the cache manager is not started or is not configured to use aProtoStreamMarshaller
-
bytes2obj
public static <T> T bytes2obj(Marshaller marshaller, byte[] bytes, boolean objectStorage, ClassAllowList allowList) -
bytes2obj
public static <T> T bytes2obj(Marshaller marshaller, InputStream inputStream, boolean objectStorage, ClassAllowList allowList) -
tryJavaDeserialize
-
obj2bytes
@Deprecated(forRemoval=true, since="12.0") public static byte[] obj2bytes(Marshaller marshaller, Object o, boolean isKey, int estimateKeySize, int estimateValueSize) Deprecated, for removal: This API element is subject to removal in a future version.Since 12.0, will be removed in 15.0 -
obj2bytes
-
obj2stream
public static void obj2stream(Marshaller marshaller, Object o, OutputStream stream, BufferSizePredictor sizePredictor)
-