public class DefaultTransformerRegistry extends AbstractMap<TransformerKey,Transformer> implements TransformerRegistry<TransformerKey>
TransformerRegistry.AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
DefaultTransformerRegistry(CamelContext context) |
DefaultTransformerRegistry(CamelContext context,
List<TransformerDefinition> 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 transformers in the dynamic registry
|
Set<Map.Entry<TransformerKey,Transformer>> |
entrySet() |
Transformer |
get(Object o) |
int |
getMaximumCacheSize()
Maximum number of entries to store in the dynamic registry
|
boolean |
isDynamic(DataType from,
DataType to)
Whether the given
Transformer is stored in the dynamic cache |
boolean |
isDynamic(String scheme)
Whether the given transformer is stored in the dynamic cache
|
boolean |
isEmpty() |
boolean |
isStatic(DataType from,
DataType to)
Whether the given transformer is stored in the static cache
|
boolean |
isStatic(String scheme)
Whether the given transformer is stored in the static cache
|
void |
purge()
Purges the cache
|
Transformer |
put(TransformerKey key,
Transformer transformer) |
Transformer |
remove(Object o) |
Transformer |
resolveTransformer(TransformerKey key)
Lookup a
Transformer in the registry which supports the transformation for
the data types represented by the key. |
int |
size() |
void |
start()
Starts the service
|
int |
staticSize()
Number of transformers in the static registry.
|
void |
stop()
Stops the service
|
String |
toString() |
finalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, keySet, merge, putAll, putIfAbsent, remove, replace, replace, replaceAll, valuespublic DefaultTransformerRegistry(CamelContext context) throws Exception
Exceptionpublic DefaultTransformerRegistry(CamelContext context, List<TransformerDefinition> definitions) throws Exception
Exceptionpublic Transformer resolveTransformer(TransformerKey key)
TransformerRegistryTransformer in the registry which supports the transformation for
the data types represented by the key.resolveTransformer in interface TransformerRegistry<TransformerKey>key - a key represents the from/to data types to transformTransformer if matched, otherwise nullpublic void start() throws Exception
Servicepublic Transformer get(Object o)
get in interface Map<TransformerKey,Transformer>get in class AbstractMap<TransformerKey,Transformer>public Transformer put(TransformerKey key, Transformer transformer)
put in interface Map<TransformerKey,Transformer>put in class AbstractMap<TransformerKey,Transformer>public boolean containsKey(Object o)
containsKey in interface Map<TransformerKey,Transformer>containsKey in class AbstractMap<TransformerKey,Transformer>public boolean containsValue(Object o)
containsValue in interface Map<TransformerKey,Transformer>containsValue in class AbstractMap<TransformerKey,Transformer>public int size()
size in interface Map<TransformerKey,Transformer>size in class AbstractMap<TransformerKey,Transformer>public int staticSize()
TransformerRegistrystaticSize in interface TransformerRegistry<TransformerKey>public int dynamicSize()
TransformerRegistrydynamicSize in interface TransformerRegistry<TransformerKey>public boolean isEmpty()
isEmpty in interface Map<TransformerKey,Transformer>isEmpty in class AbstractMap<TransformerKey,Transformer>public Transformer remove(Object o)
remove in interface Map<TransformerKey,Transformer>remove in class AbstractMap<TransformerKey,Transformer>public void clear()
clear in interface Map<TransformerKey,Transformer>clear in class AbstractMap<TransformerKey,Transformer>public Set<Map.Entry<TransformerKey,Transformer>> entrySet()
entrySet in interface Map<TransformerKey,Transformer>entrySet in class AbstractMap<TransformerKey,Transformer>public int getMaximumCacheSize()
TransformerRegistrygetMaximumCacheSize in interface TransformerRegistry<TransformerKey>public void purge()
purge in interface TransformerRegistry<TransformerKey>public void cleanUp()
TransformerRegistrycleanUp in interface TransformerRegistry<TransformerKey>public boolean isStatic(String scheme)
TransformerRegistryisStatic in interface TransformerRegistry<TransformerKey>scheme - the scheme supported by this transformerpublic boolean isStatic(DataType from, DataType to)
TransformerRegistryisStatic in interface TransformerRegistry<TransformerKey>from - 'from' data typeto - 'to' data typepublic boolean isDynamic(String scheme)
TransformerRegistryisDynamic in interface TransformerRegistry<TransformerKey>scheme - the scheme supported by this transformerpublic boolean isDynamic(DataType from, DataType to)
TransformerRegistryTransformer is stored in the dynamic cacheisDynamic in interface TransformerRegistry<TransformerKey>from - 'from' data typeto - 'to' data typepublic void stop() throws Exception
Servicepublic String toString()
toString in class AbstractMap<TransformerKey,Transformer>Apache Camel