java.lang.Object
org.jvnet.hk2.internal.ServiceLocatorRuntimeImpl
- All Implemented Interfaces:
ServiceLocatorRuntimeBean
@Singleton
@Visibility(LOCAL)
public class ServiceLocatorRuntimeImpl
extends Object
implements ServiceLocatorRuntimeBean
- Author:
- jwells
-
Method Summary
Modifier and TypeMethodDescriptionvoidClears all entries from the HK2 reflection cache.voidClears all entries from the HK2 service cache.intReturns the current total number of children attached to this ServiceLocatorintReturns the total number of descriptors in this ServiceLocator.intReturns the current size of the HK2 reflection cache.intReturns the maximum number of entries allowed in the HK2 service cache.intReturns the current size of the HK2 service cache.
-
Method Details
-
getNumberOfDescriptors
public int getNumberOfDescriptors()Description copied from interface:ServiceLocatorRuntimeBeanReturns the total number of descriptors in this ServiceLocator. Does not include parent services- Specified by:
getNumberOfDescriptorsin interfaceServiceLocatorRuntimeBean- Returns:
- The number of services in this ServiceLocator (does not include services in the parent locator)
-
getNumberOfChildren
public int getNumberOfChildren()Description copied from interface:ServiceLocatorRuntimeBeanReturns the current total number of children attached to this ServiceLocator- Specified by:
getNumberOfChildrenin interfaceServiceLocatorRuntimeBean- Returns:
- The current number of children locators attached to this ServiceLocator
-
getServiceCacheSize
public int getServiceCacheSize()Description copied from interface:ServiceLocatorRuntimeBeanReturns the current size of the HK2 service cache. The service cache is used to optimize frequent service lookups and injections- Specified by:
getServiceCacheSizein interfaceServiceLocatorRuntimeBean- Returns:
- The current size of the HK2 service cache
-
getServiceCacheMaximumSize
public int getServiceCacheMaximumSize()Description copied from interface:ServiceLocatorRuntimeBeanReturns the maximum number of entries allowed in the HK2 service cache. The service cache is used to optimize frequent service lookups and injections- Specified by:
getServiceCacheMaximumSizein interfaceServiceLocatorRuntimeBean- Returns:
- The maximum number of entries allowed in the HK2 service cache
-
clearServiceCache
public void clearServiceCache()Description copied from interface:ServiceLocatorRuntimeBeanClears 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- Specified by:
clearServiceCachein interfaceServiceLocatorRuntimeBean
-
getReflectionCacheSize
public int getReflectionCacheSize()Description copied from interface:ServiceLocatorRuntimeBeanReturns the current size of the HK2 reflection cache. The reflection cache is used to minimize the amount of reflection done by HK2- Specified by:
getReflectionCacheSizein interfaceServiceLocatorRuntimeBean- Returns:
- The current size of the HK2 reflection cache
-
clearReflectionCache
public void clearReflectionCache()Description copied from interface:ServiceLocatorRuntimeBeanClears 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- Specified by:
clearReflectionCachein interfaceServiceLocatorRuntimeBean
-