Package org.jvnet.hk2.external.runtime
Interface ServiceLocatorRuntimeBean
- All Known Implementing Classes:
ServiceLocatorRuntimeImpl
Runtime information about the ServiceLocator.
The ServiceLocatorRuntimeBean is specific to
this implementation of the HK2 API. Further,
none of the values or operations on this bean
are guaranteed to be meaningful in the next
version of HK2, which may have used different
algorithms
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Clears all entries from the HK2 reflection cache.void
Clears all entries from the HK2 service cache.int
Returns the current total number of children attached to this ServiceLocatorint
Returns the total number of descriptors in this ServiceLocator.int
Returns the current size of the HK2 reflection cache.int
Returns the maximum number of entries allowed in the HK2 service cache.int
Returns the current size of the HK2 service cache.
-
Method Details
-
getNumberOfDescriptors
int getNumberOfDescriptors()Returns the total number of descriptors in this ServiceLocator. Does not include parent services- Returns:
- The number of services in this ServiceLocator (does not include services in the parent locator)
-
getNumberOfChildren
int getNumberOfChildren()Returns the current total number of children attached to this ServiceLocator- Returns:
- The current number of children locators attached to this ServiceLocator
-
getServiceCacheSize
int getServiceCacheSize()Returns the current size of the HK2 service cache. The service cache is used to optimize frequent service lookups and injections- Returns:
- The current size of the HK2 service cache
-
getServiceCacheMaximumSize
int getServiceCacheMaximumSize()Returns the maximum number of entries allowed in the HK2 service cache. The service cache is used to optimize frequent service lookups and injections- Returns:
- The maximum number of entries allowed in the HK2 service cache
-
clearServiceCache
void clearServiceCache()Clears all entries from the HK2 service cache. The service cache is used to optimize frequent service lookups and injections. Calling this method may free up memory but will cause degraded injection and lookup performance until the cache can be built back up -
getReflectionCacheSize
int getReflectionCacheSize()Returns the current size of the HK2 reflection cache. The reflection cache is used to minimize the amount of reflection done by HK2- Returns:
- The current size of the HK2 reflection cache
-
clearReflectionCache
void clearReflectionCache()Clears all entries from the HK2 reflection cache. The reflection cache is used to minimize the amount of reflection done by HK2. Calling this method may free up memory but will cause degraded service creation performance until the cache can be built back up
-