Class ServiceLocatorRuntimeImpl

java.lang.Object
org.jvnet.hk2.internal.ServiceLocatorRuntimeImpl
All Implemented Interfaces:
ServiceLocatorRuntimeBean

@Singleton @Visibility(LOCAL) public class ServiceLocatorRuntimeImpl extends Object implements ServiceLocatorRuntimeBean
  • Field Details

  • Constructor Details

    • ServiceLocatorRuntimeImpl

      @Inject private ServiceLocatorRuntimeImpl(ServiceLocator locator)
  • Method Details

    • getNumberOfDescriptors

      public int getNumberOfDescriptors()
      Description copied from interface: ServiceLocatorRuntimeBean
      Returns the total number of descriptors in this ServiceLocator. Does not include parent services
      Specified by:
      getNumberOfDescriptors in interface ServiceLocatorRuntimeBean
      Returns:
      The number of services in this ServiceLocator (does not include services in the parent locator)
    • getNumberOfChildren

      public int getNumberOfChildren()
      Description copied from interface: ServiceLocatorRuntimeBean
      Returns the current total number of children attached to this ServiceLocator
      Specified by:
      getNumberOfChildren in interface ServiceLocatorRuntimeBean
      Returns:
      The current number of children locators attached to this ServiceLocator
    • getServiceCacheSize

      public int getServiceCacheSize()
      Description copied from interface: ServiceLocatorRuntimeBean
      Returns the current size of the HK2 service cache. The service cache is used to optimize frequent service lookups and injections
      Specified by:
      getServiceCacheSize in interface ServiceLocatorRuntimeBean
      Returns:
      The current size of the HK2 service cache
    • getServiceCacheMaximumSize

      public int getServiceCacheMaximumSize()
      Description copied from interface: ServiceLocatorRuntimeBean
      Returns 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:
      getServiceCacheMaximumSize in interface ServiceLocatorRuntimeBean
      Returns:
      The maximum number of entries allowed in the HK2 service cache
    • clearServiceCache

      public void clearServiceCache()
      Description copied from interface: ServiceLocatorRuntimeBean
      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
      Specified by:
      clearServiceCache in interface ServiceLocatorRuntimeBean
    • getReflectionCacheSize

      public int getReflectionCacheSize()
      Description copied from interface: ServiceLocatorRuntimeBean
      Returns the current size of the HK2 reflection cache. The reflection cache is used to minimize the amount of reflection done by HK2
      Specified by:
      getReflectionCacheSize in interface ServiceLocatorRuntimeBean
      Returns:
      The current size of the HK2 reflection cache
    • clearReflectionCache

      public void clearReflectionCache()
      Description copied from interface: ServiceLocatorRuntimeBean
      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
      Specified by:
      clearReflectionCache in interface ServiceLocatorRuntimeBean