Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
package org.testifyproject.testifyproject.fasterxml.jackson.databind.org.testifyproject.testifyprojectser;
import java.util.HashMap;
import java.util.concurrent.ConcurrentHashMap;
import org.testifyproject.testifyproject.fasterxml.jackson.annotation.JsonFormat;
import org.testifyproject.testifyproject.fasterxml.jackson.databind.*;
import org.testifyproject.testifyproject.fasterxml.jackson.databind.org.testifyproject.testifyprojectser.std.StdDelegatingDeserializer;
import org.testifyproject.testifyproject.fasterxml.jackson.databind.introspect.Annotated;
import org.testifyproject.testifyproject.fasterxml.jackson.databind.type.*;
import org.testifyproject.testifyproject.fasterxml.jackson.databind.util.ClassUtil;
import org.testifyproject.testifyproject.fasterxml.jackson.databind.util.Converter;
/**
* Class that org.testifyproject.testifyprojectfines caching layer between callers (like
* {@link ObjectMapper},
* {@link org.testifyproject.testifyproject.fasterxml.jackson.databind.DeserializationContext})
* and classes that construct org.testifyproject.testifyprojectserializers
* ({@link org.testifyproject.testifyproject.fasterxml.jackson.databind.org.testifyproject.testifyprojectser.DeserializerFactory}).
*/
public final class DeserializerCache
implements java.org.testifyproject.testifyproject.Serializable // since 2.1 -- needs to be careful tho
{
private static final long serialVersionUID = 1L;
/*
/**********************************************************
/* Caching
/**********************************************************
*/
/**
* We will also cache some dynamically constructed org.testifyproject.testifyprojectserializers;
* specifically, ones that are expensive to construct.
* This currently means bean and Enum org.testifyproject.testifyprojectserializers; starting with
* 2.5, container org.testifyproject.testifyprojectserializers will also be cached.
*
* Given that we don't expect much concurrency for additions
* (should very quickly converge to zero after startup), let's
* org.testifyproject.testifyprojectfine a relatively low concurrency setting.
*/
final protected ConcurrentHashMap> _cachedDeserializers
= new ConcurrentHashMap>(64, 0.75f, 4);
/**
* During org.testifyproject.testifyprojectserializer construction process we may need to keep track of partially
* org.testifyproject.testifyprojectpleted org.testifyproject.testifyprojectserializers, to resolve cyclic org.testifyproject.testifyprojectpendencies. This is the
* map used for storing org.testifyproject.testifyprojectserializers before they are fully org.testifyproject.testifyprojectplete.
*/
final protected HashMap> _incompleteDeserializers
= new HashMap>(8);
/*
/**********************************************************
/* Life-cycle
/**********************************************************
*/
public DeserializerCache() { }
/*
/**********************************************************
/* JDK serialization handling
/**********************************************************
*/
Object writeReplace() {
// instead of making this transient, just clear it:
_incompleteDeserializers.clear();
// TODO: clear out "cheap" cached org.testifyproject.testifyprojectserializers?
return this;
}
/*
/**********************************************************
/* Access to caching aspects
/**********************************************************
*/
/**
* Method that can be used to org.testifyproject.testifyprojecttermine how many org.testifyproject.testifyprojectserializers this
* provider is caching currently
* (if it does caching: org.testifyproject.testifyprojectfault implementation does)
* Exact count org.testifyproject.testifyprojectpends on what kind of org.testifyproject.testifyprojectserializers get cached;
* org.testifyproject.testifyprojectfault implementation caches only dynamically constructed org.testifyproject.testifyprojectserializers,
* but not eagerly constructed standard org.testifyproject.testifyprojectserializers (which is different
* from how serializer provider works).
*
* The main use case for this method is to allow conditional flushing of
* org.testifyproject.testifyprojectserializer cache, if certain number of entries is reached.
*/
public int cachedDeserializersCount() {
return _cachedDeserializers.size();
}
/**
* Method that will drop all dynamically constructed org.testifyproject.testifyprojectserializers (ones that
* are counted as result value for {@link #cachedDeserializersCount}).
* This can be used to remove memory usage (in case some org.testifyproject.testifyprojectserializers are
* only used once or so), or to force re-construction of org.testifyproject.testifyprojectserializers after
* configuration changes for mapper than owns the provider.
*/
public void flushCachedDeserializers() {
_cachedDeserializers.clear();
}
/*
/**********************************************************
/* General org.testifyproject.testifyprojectserializer locating method
/**********************************************************
*/
/**
* Method called to get hold of a org.testifyproject.testifyprojectserializer for a value of given type;
* or if no such org.testifyproject.testifyprojectserializer can be found, a org.testifyproject.testifyprojectfault handler (which
* may do a best-effort generic serialization or just simply
* throw an exception when invoked).
*
* Note: this method is only called for value types; not for keys.
* Key org.testifyproject.testifyprojectserializers can be accessed using {@link #findKeyDeserializer}.
*
* Note also that org.testifyproject.testifyprojectserializer returned is guaranteed to be resolved
* (if it is of type {@link ResolvableDeserializer}), but
* not contextualized (wrt {@link ContextualDeserializer}): caller
* has to handle latter if necessary.
*
* @param ctxt Deserialization context
* @param propertyType Declared type of the value to org.testifyproject.testifyprojectserializer (obtained using
* 'setter' method signature and/or type annotations
*
* @throws JsonMappingException if there are fatal problems with
* accessing suitable org.testifyproject.testifyprojectserializer; including that of not
* finding any serializer
*/
public JsonDeserializer