Interface ValidatorRegistry
- All Superinterfaces:
AutoCloseable, Map<ValidatorKey, Validator>, Service, StaticService
Registry to cache validators in memory.
The registry contains two caches:
- static - which keeps all the validators in the cache for the entire lifecycle
- dynamic - which keeps the validators in a
and may evict validators which hasn't been requested recently
invalid reference
org.apache.camel.support.LRUCache
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoidcleanUp()Cleanup the cache (purging stale entries)intNumber of validators in the dynamic registryintMaximum number of entries to store in the dynamic registrybooleanWhether the givenValidatoris stored in the dynamic cachebooleanWhether the givenValidatoris stored in the static cachevoidpurge()Purges the cache (removes validators from the dynamic cache)Lookup aValidatorin the registry which supports the validation for the data type represented by the key.intNumber of validators in the static registry.Methods inherited from interface Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Method Details
-
resolveValidator
-
staticSize
int staticSize()Number of validators in the static registry. -
dynamicSize
int dynamicSize()Number of validators in the dynamic registry -
getMaximumCacheSize
int getMaximumCacheSize()Maximum number of entries to store in the dynamic registry -
purge
void purge()Purges the cache (removes validators from the dynamic cache) -
isStatic
-
isDynamic
-
cleanUp
void cleanUp()Cleanup the cache (purging stale entries)
-