Top Description Methods
org.jvnet.hk2.external.runtime

public Interface ServiceLocatorRuntimeBean

Known Direct Implementers
org.jvnet.hk2.internal.ServiceLocatorRuntimeImpl
Annotations
@Contract
Imports
org.jvnet.hk2.annotations.Contract

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
Author
jwells

Method Summary

Modifier and TypeMethod and Description
public void
clearReflectionCache()

Clears all entries from the HK2 reflection cache.

public void
clearServiceCache()

Clears all entries from the HK2 service cache.

public int

Returns:

The current number of children locators attached to this ServiceLocator
getNumberOfChildren
()

Returns the current total number of children attached to this ServiceLocator

public int

Returns:

The number of services in this ServiceLocator (does not include services in the parent locator)
getNumberOfDescriptors
()

Returns the total number of descriptors in this ServiceLocator.

public int

Returns:

The current size of the HK2 reflection cache
getReflectionCacheSize
()

Returns the current size of the HK2 reflection cache.

public int

Returns:

The maximum number of entries allowed in the HK2 service cache
getServiceCacheMaximumSize
()

Returns the maximum number of entries allowed in the HK2 service cache.

public int

Returns:

The current size of the HK2 service cache
getServiceCacheSize
()

Returns the current size of the HK2 service cache.

Method Detail

clearReflectionCacheback to summary
public 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

clearServiceCacheback to summary
public 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

getNumberOfChildrenback to summary
public int getNumberOfChildren()

Returns the current total number of children attached to this ServiceLocator

Returns:int

The current number of children locators attached to this ServiceLocator

getNumberOfDescriptorsback to summary
public int getNumberOfDescriptors()

Returns the total number of descriptors in this ServiceLocator. Does not include parent services

Returns:int

The number of services in this ServiceLocator (does not include services in the parent locator)

getReflectionCacheSizeback to summary
public 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:int

The current size of the HK2 reflection cache

getServiceCacheMaximumSizeback to summary
public 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:int

The maximum number of entries allowed in the HK2 service cache

getServiceCacheSizeback to summary
public int getServiceCacheSize()

Returns the current size of the HK2 service cache. The service cache is used to optimize frequent service lookups and injections

Returns:int

The current size of the HK2 service cache