code: public static SerializationContext getSerializationContext(RemoteCacheManager remoteCacheManager) {
        Marshaller marshaller = remoteCacheManager.getMarshaller();
        if (marshaller instanceof ProtoStreamMarshaller) {
           return ((ProtoStreamMarshaller) marshaller).getSerializationContext();
        }
        throw new HotRodClientException("The cache manager must be configured with a ProtoStreamMarshaller");
     }
docs: Obtains the {@link SerializationContext} associated with the given remote cache manager.
  
  @param remoteCacheManager the remote cache manager (must not be {@code null})
  @return the associated {@link SerializationContext}
  @throws HotRodClientException if the cache manager is not configured to use a {@link ProtoStreamMarshaller}