Class MarshallerUtil
- java.lang.Object
-
- org.infinispan.client.hotrod.marshall.MarshallerUtil
-
public final class MarshallerUtil extends java.lang.Object
- Author:
- Galder ZamarreƱo
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> T
bytes2obj(Marshaller marshaller, byte[] bytes, boolean objectStorage, ClassWhiteList whitelist)
static org.infinispan.protostream.SerializationContext
getSerializationContext(RemoteCacheManager remoteCacheManager)
A convenience method to return theSerializationContext
associated with theProtoStreamMarshaller
configured on the providedRemoteCacheManager
.static byte[]
obj2bytes(Marshaller marshaller, java.lang.Object o, boolean isKey, int estimateKeySize, int estimateValueSize)
static <T> T
tryJavaDeserialize(byte[] bytes, byte[] ret, ClassWhiteList whitelist)
-
-
-
Method Detail
-
getSerializationContext
public static org.infinispan.protostream.SerializationContext getSerializationContext(RemoteCacheManager remoteCacheManager)
A convenience method to return theSerializationContext
associated with theProtoStreamMarshaller
configured 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, ClassWhiteList whitelist)
-
tryJavaDeserialize
public static <T> T tryJavaDeserialize(byte[] bytes, byte[] ret, ClassWhiteList whitelist)
-
obj2bytes
public static byte[] obj2bytes(Marshaller marshaller, java.lang.Object o, boolean isKey, int estimateKeySize, int estimateValueSize)
-
-