public static class DefaultCacheProvider.Builder extends Object
DefaultCacheProvider
, keeping it immutable.Modifier and Type | Method and Description |
---|---|
DefaultCacheProvider |
build()
Constructs a
DefaultCacheProvider with the provided configuration values, using defaults where not specified. |
DefaultCacheProvider.Builder |
maxDeserializerCacheSize(int maxDeserializerCacheSize)
Define the maximum size of the
LookupCache instance constructed by DefaultCacheProvider.forDeserializerCache(DeserializationConfig)
and DefaultCacheProvider._buildCache(int) . |
DefaultCacheProvider.Builder |
maxSerializerCacheSize(int maxSerializerCacheSize)
Define the maximum size of the
LookupCache instance constructed by DefaultCacheProvider.forSerializerCache(SerializationConfig)
and DefaultCacheProvider._buildCache(int)
Note that specifying a maximum size of zero prevents values from being retained in the cache. |
DefaultCacheProvider.Builder |
maxTypeFactoryCacheSize(int maxTypeFactoryCacheSize)
Define the maximum size of the
LookupCache instance constructed by DefaultCacheProvider.forTypeFactory()
and DefaultCacheProvider._buildCache(int)
Note that specifying a maximum size of zero prevents values from being retained in the cache. |
public DefaultCacheProvider.Builder maxDeserializerCacheSize(int maxDeserializerCacheSize)
LookupCache
instance constructed by DefaultCacheProvider.forDeserializerCache(DeserializationConfig)
and DefaultCacheProvider._buildCache(int)
.
Note that specifying a maximum size of zero prevents values from being retained in the cache.
maxDeserializerCacheSize
- Size for the LookupCache
to use within DeserializerCache
IllegalArgumentException
- if maxDeserializerCacheSize
is negativepublic DefaultCacheProvider.Builder maxSerializerCacheSize(int maxSerializerCacheSize)
LookupCache
instance constructed by DefaultCacheProvider.forSerializerCache(SerializationConfig)
and DefaultCacheProvider._buildCache(int)
Note that specifying a maximum size of zero prevents values from being retained in the cache.
maxSerializerCacheSize
- Size for the LookupCache
to use within SerializerCache
IllegalArgumentException
- if maxSerializerCacheSize
is negativepublic DefaultCacheProvider.Builder maxTypeFactoryCacheSize(int maxTypeFactoryCacheSize)
LookupCache
instance constructed by DefaultCacheProvider.forTypeFactory()
and DefaultCacheProvider._buildCache(int)
Note that specifying a maximum size of zero prevents values from being retained in the cache.
maxTypeFactoryCacheSize
- Size for the LookupCache
to use within TypeFactory
IllegalArgumentException
- if maxTypeFactoryCacheSize
is negativepublic DefaultCacheProvider build()
DefaultCacheProvider
with the provided configuration values, using defaults where not specified.DefaultCacheProvider
instance with the specified configurationCopyright © 2008–2024 FasterXML. All rights reserved.