tools.jackson.databind.SerializationContext . It will be constructed and configured during
ObjectMapper building phase, and will be called once per writeValue
call to construct actual stateful tools.jackson.databind.SerializationContext to use during
serialization.
Note that since this object has to be serializable (to allow JDK serialization of
mapper instances), tools. need not be serializable any more.
| Modifier and Type | Class and Description |
|---|---|
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| protected final transient SerializerCache | _cache
Cache for doing type-to-value-serializer lookups. |
| protected final transient SerializerFactory | _serializerFactory
Factory responsible for constructing standard serializers. |
| protected final transient TokenStreamFactory | _streamFactory
Low-level |
| private static final long |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected | SerializationContexts(TokenStreamFactory tsf, SerializerFactory serializerFactory, SerializerCache cache)
|
| Modifier and Type | Method and Description |
|---|---|
| public int | cachedSerializersCount()
Method that can be used to determine how many serializers this provider is caching currently (if it does caching: default implementation does) Exact count depends on what kind of serializers get cached; default implementation caches all serializers, including ones that are eagerly constructed (for optimal access speed) The main use case for this method is to allow conditional flushing of serializer cache, if certain number of entries is reached. |
| public abstract SerializationContextExt | createContext(SerializationConfig config, GeneratorSettings genSettings)
Factory method for constructing context object for individual |
| public void | |
| public SerializationContexts | forMapper(Object mapper, SerializationConfig config, TokenStreamFactory tsf, SerializerFactory serializerFactory)
Mutant factory method called when instance is actually created for use by mapper (as opposed to coming into existence during building, module registration). |
| protected abstract SerializationContexts | forMapper(Object mapper, TokenStreamFactory tsf, SerializerFactory serializerFactory, SerializerCache cache)
|
| _cache | back to summary |
|---|---|
| protected final transient SerializerCache _cache Cache for doing type-to-value-serializer lookups. | |
| _serializerFactory | back to summary |
|---|---|
| protected final transient SerializerFactory _serializerFactory Factory responsible for constructing standard serializers. | |
| _streamFactory | back to summary |
|---|---|
| protected final transient TokenStreamFactory _streamFactory Low-level | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| SerializationContexts | back to summary |
|---|---|
| protected SerializationContexts() | |
| SerializationContexts | back to summary |
|---|---|
| protected SerializationContexts(TokenStreamFactory tsf, SerializerFactory serializerFactory, SerializerCache cache) | |
| cachedSerializersCount | back to summary |
|---|---|
| public int cachedSerializersCount() Method that can be used to determine how many serializers this provider is caching currently (if it does caching: default implementation does) Exact count depends on what kind of serializers get cached; default implementation caches all serializers, including ones that are eagerly constructed (for optimal access speed) The main use case for this method is to allow conditional flushing of serializer cache, if certain number of entries is reached. | |
| createContext | back to summary |
|---|---|
| public abstract SerializationContextExt createContext(SerializationConfig config, GeneratorSettings genSettings) Factory method for constructing context object for individual | |
| flushCachedSerializers | back to summary |
|---|---|
| public void flushCachedSerializers() Method that will drop all serializers currently cached by this provider. This can be used to remove memory usage (in case some serializers are only used once or so), or to force re-construction of serializers after configuration changes for mapper than owns the provider. | |
| forMapper | back to summary |
|---|---|
| public SerializationContexts forMapper(Object mapper, SerializationConfig config, TokenStreamFactory tsf, SerializerFactory serializerFactory) Mutant factory method called when instance is actually created for use by mapper (as opposed to coming into existence during building, module registration). Necessary usually to initialize non-configuration state, such as caching. | |
| forMapper | back to summary |
|---|---|
| protected abstract SerializationContexts forMapper(Object mapper, TokenStreamFactory tsf, SerializerFactory serializerFactory, SerializerCache cache) | |
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public SerializerCache | |
| public SerializationContextExt | createContext(SerializationConfig config, GeneratorSettings genSettings)
Implements abstract tools. Factory method for constructing context object for individual |
| public SerializationContexts | forMapper(Object mapper, TokenStreamFactory tsf, SerializerFactory serializerFactory, SerializerCache cache)
Implements abstract tools.
|
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides tools. | |
| DefaultImpl | back to summary |
|---|---|
| public DefaultImpl() | |
| DefaultImpl | back to summary |
|---|---|
| public DefaultImpl(TokenStreamFactory tsf, SerializerFactory serializerFactory, SerializerCache cache) | |
| cacheForTests | back to summary |
|---|---|
| public SerializerCache cacheForTests() | |
| createContext | back to summary |
|---|---|
| public SerializationContextExt createContext(SerializationConfig config, GeneratorSettings genSettings) Implements abstract tools. Doc from tools. Factory method for constructing context object for individual
| |
| forMapper | back to summary |
|---|---|
| public SerializationContexts forMapper(Object mapper, TokenStreamFactory tsf, SerializerFactory serializerFactory, SerializerCache cache) Implements abstract tools.
| |