public class DefaultValidatorRegistry extends AbstractMap<ValidatorKey,Validator> implements ValidatorRegistry<ValidatorKey>
ValidatorRegistry.AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
DefaultValidatorRegistry(CamelContext context) |
DefaultValidatorRegistry(CamelContext context,
List<ValidatorDefinition> definitions) |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanUp()
Cleanup the cache (purging stale entries)
|
void |
clear() |
boolean |
containsKey(Object o) |
boolean |
containsValue(Object o) |
int |
dynamicSize()
Number of validators in the dynamic registry
|
Set<Map.Entry<ValidatorKey,Validator>> |
entrySet() |
Validator |
get(Object o) |
int |
getMaximumCacheSize()
Maximum number of entries to store in the dynamic registry
|
boolean |
isDynamic(DataType type)
Whether the given
Validator is stored in the dynamic cache |
boolean |
isEmpty() |
boolean |
isStatic(DataType type)
Whether the given
Validator is stored in the static cache |
void |
purge()
Purges the cache
|
Validator |
put(ValidatorKey key,
Validator validator) |
Validator |
remove(Object o) |
Validator |
resolveValidator(ValidatorKey key)
Lookup a
Validator in the registry which supports the validation for
the data type represented by the key. |
void |
start()
Starts the service
|
int |
staticSize()
Number of validators in the static registry.
|
void |
stop()
Stops the service
|
String |
toString() |
clone, equals, hashCode, keySet, putAll, size, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, keySet, merge, putAll, putIfAbsent, remove, replace, replace, replaceAll, size, valuespublic DefaultValidatorRegistry(CamelContext context) throws Exception
Exceptionpublic DefaultValidatorRegistry(CamelContext context, List<ValidatorDefinition> definitions) throws Exception
Exceptionpublic Validator resolveValidator(ValidatorKey key)
ValidatorRegistryValidator in the registry which supports the validation for
the data type represented by the key.resolveValidator in interface ValidatorRegistry<ValidatorKey>key - a key represents the data typeValidator if matched, otherwise nullpublic void start() throws Exception
Servicepublic Validator get(Object o)
get in interface Map<ValidatorKey,Validator>get in class AbstractMap<ValidatorKey,Validator>public Validator put(ValidatorKey key, Validator validator)
put in interface Map<ValidatorKey,Validator>put in class AbstractMap<ValidatorKey,Validator>public boolean containsKey(Object o)
containsKey in interface Map<ValidatorKey,Validator>containsKey in class AbstractMap<ValidatorKey,Validator>public boolean containsValue(Object o)
containsValue in interface Map<ValidatorKey,Validator>containsValue in class AbstractMap<ValidatorKey,Validator>public int staticSize()
ValidatorRegistrystaticSize in interface ValidatorRegistry<ValidatorKey>public int dynamicSize()
ValidatorRegistrydynamicSize in interface ValidatorRegistry<ValidatorKey>public boolean isEmpty()
isEmpty in interface Map<ValidatorKey,Validator>isEmpty in class AbstractMap<ValidatorKey,Validator>public Validator remove(Object o)
remove in interface Map<ValidatorKey,Validator>remove in class AbstractMap<ValidatorKey,Validator>public void clear()
clear in interface Map<ValidatorKey,Validator>clear in class AbstractMap<ValidatorKey,Validator>public Set<Map.Entry<ValidatorKey,Validator>> entrySet()
entrySet in interface Map<ValidatorKey,Validator>entrySet in class AbstractMap<ValidatorKey,Validator>public int getMaximumCacheSize()
ValidatorRegistrygetMaximumCacheSize in interface ValidatorRegistry<ValidatorKey>public void purge()
purge in interface ValidatorRegistry<ValidatorKey>public void cleanUp()
ValidatorRegistrycleanUp in interface ValidatorRegistry<ValidatorKey>public boolean isStatic(DataType type)
ValidatorRegistryValidator is stored in the static cacheisStatic in interface ValidatorRegistry<ValidatorKey>type - the data typepublic boolean isDynamic(DataType type)
ValidatorRegistryValidator is stored in the dynamic cacheisDynamic in interface ValidatorRegistry<ValidatorKey>type - the data typepublic void stop() throws Exception
Servicepublic String toString()
toString in class AbstractMap<ValidatorKey,Validator>Apache Camel