Package org.apache.camel.impl.engine
Class AbstractDynamicRegistry<K,V>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- org.apache.camel.impl.engine.AbstractDynamicRegistry<K,V>
-
- All Implemented Interfaces:
AutoCloseable
,Map<K,V>
,org.apache.camel.Service
,org.apache.camel.StaticService
- Direct Known Subclasses:
DefaultEndpointRegistry
,DefaultTransformerRegistry
,DefaultValidatorRegistry
public class AbstractDynamicRegistry<K,V> extends AbstractMap<K,V> implements org.apache.camel.StaticService
Base implementation forTransformerRegistry
,ValidatorRegistry
andEndpointRegistry
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.camel.ExtendedCamelContext
context
protected Map<K,V>
dynamicMap
protected int
maxCacheSize
protected org.apache.camel.spi.RouteController
routeController
protected Map<K,V>
staticMap
-
Constructor Summary
Constructors Constructor Description AbstractDynamicRegistry(org.apache.camel.CamelContext context, int maxCacheSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanUp()
void
clear()
boolean
containsKey(Object o)
boolean
containsValue(Object o)
int
dynamicSize()
Set<Map.Entry<K,V>>
entrySet()
V
get(Object o)
int
getMaximumCacheSize()
boolean
isDynamic(K key)
boolean
isEmpty()
boolean
isStatic(K key)
void
purge()
Purges the cacheV
put(K key, V transformer)
V
remove(Object o)
int
size()
void
start()
int
staticSize()
void
stop()
String
toString()
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Method Detail
-
start
public void start()
- Specified by:
start
in interfaceorg.apache.camel.Service
-
containsKey
public boolean containsKey(Object o)
- Specified by:
containsKey
in interfaceMap<K,V>
- Overrides:
containsKey
in classAbstractMap<K,V>
-
containsValue
public boolean containsValue(Object o)
- Specified by:
containsValue
in interfaceMap<K,V>
- Overrides:
containsValue
in classAbstractMap<K,V>
-
size
public int size()
-
staticSize
public int staticSize()
-
dynamicSize
public int dynamicSize()
-
isEmpty
public boolean isEmpty()
-
clear
public void clear()
-
getMaximumCacheSize
public int getMaximumCacheSize()
-
purge
public void purge()
Purges the cache
-
cleanUp
public void cleanUp()
-
isStatic
public boolean isStatic(K key)
-
isDynamic
public boolean isDynamic(K key)
-
stop
public void stop()
- Specified by:
stop
in interfaceorg.apache.camel.Service
-
toString
public String toString()
- Overrides:
toString
in classAbstractMap<K,V>
-
-