Class DeserializerCache

    • Constructor Detail

      • DeserializerCache

        public DeserializerCache()
      • DeserializerCache

        public DeserializerCache​(int maxSize)
    • Method Detail

      • cachedDeserializersCount

        public int cachedDeserializersCount()
        Method that can be used to determine how many deserializers this provider is caching currently (if it does caching: default implementation does) Exact count depends on what kind of deserializers get cached; default implementation caches only dynamically constructed deserializers, but not eagerly constructed standard deserializers (which is different from how serializer provider works).

        The main use case for this method is to allow conditional flushing of deserializer cache, if certain number of entries is reached.

      • flushCachedDeserializers

        public void flushCachedDeserializers()
        Method that will drop all dynamically constructed deserializers (ones that are counted as result value for cachedDeserializersCount()). This can be used to remove memory usage (in case some deserializers are only used once or so), or to force re-construction of deserializers after configuration changes for mapper than owns the provider.