Package org.apache.camel.spi
Interface EndpointRegistry
- All Superinterfaces:
AutoCloseable
,Map<NormalizedEndpointUri,
,Endpoint> Service
,StaticService
Registry to cache endpoints in memory.
The registry contains two caches:
- static - which keeps all the endpoints in the cache for the entire lifecycle
- dynamic - which keeps the endpoints in a
invalid reference
org.apache.camel.support.LRUCache
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cleanUp()
Cleanup the cache (purging stale entries)boolean
containsKey
(Object key) Whether the given endpoint is stored in the registryint
Number of endpoints in the dynamic registryint
Maximum number of entries to store in the dynamic registryGets a read-only map of the endpoints currently in the registry.Gets a read-only collection of the endpoints currently in the registry.boolean
Whether the given endpoint is stored in the dynamic cacheboolean
Whether the given endpoint is stored in the static cachevoid
purge()
Purges the cache (removes endpoints from the dynamic cache)int
Number of endpoints in the static registry.Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Method Details
-
staticSize
int staticSize()Number of endpoints in the static registry. -
dynamicSize
int dynamicSize()Number of endpoints in the dynamic registry -
getMaximumCacheSize
int getMaximumCacheSize()Maximum number of entries to store in the dynamic registry -
purge
void purge()Purges the cache (removes endpoints from the dynamic cache) -
isStatic
Whether the given endpoint is stored in the static cache- Parameters:
key
- the endpoint key- Returns:
- true if in static cache, false if not
-
isDynamic
Whether the given endpoint is stored in the dynamic cache- Parameters:
key
- the endpoint key- Returns:
- true if in dynamic cache, false if not
-
containsKey
Whether the given endpoint is stored in the registry- Specified by:
containsKey
in interfaceMap<NormalizedEndpointUri,
Endpoint> - Parameters:
key
- the endpoint key- Returns:
- true if present, false if not
-
cleanUp
void cleanUp()Cleanup the cache (purging stale entries) -
getReadOnlyValues
Collection<Endpoint> getReadOnlyValues()Gets a read-only collection of the endpoints currently in the registry. -
getReadOnlyMap
Gets a read-only map of the endpoints currently in the registry.
-