Class MarshallerUtil


  • public final class MarshallerUtil
    extends Object
    Author:
    Galder ZamarreƱo
    • Method Detail

      • getSerializationContext

        public static org.infinispan.protostream.SerializationContext getSerializationContext​(RemoteCacheManager remoteCacheManager)
        A convenience method to return the SerializationContext associated with the ProtoStreamMarshaller configured on the provided RemoteCacheManager.
        Returns:
        the associated SerializationContext
        Throws:
        HotRodClientException - if the cache manager is not started or is not configured to use a ProtoStreamMarshaller
      • bytes2obj

        public static <T> T bytes2obj​(org.infinispan.commons.marshall.Marshaller marshaller,
                                      byte[] bytes,
                                      boolean objectStorage,
                                      org.infinispan.commons.configuration.ClassWhiteList whitelist)
      • tryJavaDeserialize

        public static <T> T tryJavaDeserialize​(byte[] bytes,
                                               byte[] ret,
                                               org.infinispan.commons.configuration.ClassWhiteList whitelist)
      • obj2bytes

        public static byte[] obj2bytes​(org.infinispan.commons.marshall.Marshaller marshaller,
                                       Object o,
                                       boolean isKey,
                                       int estimateKeySize,
                                       int estimateValueSize)