Package org.apache.camel.spi
Interface EndpointRegistry<K>
-
- Type Parameters:
K
- endpoint key
- All Superinterfaces:
AutoCloseable
,Map<K,Endpoint>
,Service
,StaticService
public interface EndpointRegistry<K> extends Map<K,Endpoint>, 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
org.apache.camel.support.LRUCache
and may evict endpoints which hasn't been requested recently
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
cleanUp()
Cleanup the cache (purging stale entries)int
dynamicSize()
Number of endpoints in the dynamic registryint
getMaximumCacheSize()
Maximum number of entries to store in the dynamic registryboolean
isDynamic(String key)
Whether the given endpoint is stored in the dynamic cacheboolean
isStatic(String key)
Whether the given endpoint is stored in the static cachevoid
purge()
Purges the cache (removes endpoints from the dynamic cache)int
staticSize()
Number of endpoints in the static registry.-
Methods inherited from interface java.util.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 Detail
-
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
boolean isStatic(String key)
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
boolean isDynamic(String key)
Whether the given endpoint is stored in the dynamic cache- Parameters:
key
- the endpoint key- Returns:
- true if in dynamic cache, false if not
-
cleanUp
void cleanUp()
Cleanup the cache (purging stale entries)
-
-