@HashCodeAndEqualsPlugin.Enhance public static class AgentBuilder.PoolStrategy.WithTypePoolCache.Simple extends AgentBuilder.PoolStrategy.WithTypePoolCache
AgentBuilder.PoolStrategy.WithTypePoolCache (note documentation of the linked class) that is based on a
ConcurrentMap. It is the responsibility of the type locator's user to avoid the type locator from leaking memory.| Modifier and Type | Class and Description |
|---|---|
protected static class |
AgentBuilder.PoolStrategy.WithTypePoolCache.Simple.BootstrapMarkerAction
An action that creates a class loader to mark the bootstrap loader without using
null. |
AgentBuilder.PoolStrategy.WithTypePoolCache.SimpleAgentBuilder.PoolStrategy.ClassLoading, AgentBuilder.PoolStrategy.Default, AgentBuilder.PoolStrategy.Eager, AgentBuilder.PoolStrategy.ExtraLazy, AgentBuilder.PoolStrategy.WithTypePoolCachelazinessMode, readerMode| Constructor and Description |
|---|
Simple(ConcurrentMap<? super ClassLoader,TypePool.CacheProvider> cacheProviders)
Creates a new type locator that caches a cache provider per class loader in a concurrent map.
|
Simple(TypePool.Default.ReaderMode readerMode,
ConcurrentMap<? super ClassLoader,TypePool.CacheProvider> cacheProviders)
Creates a new type locator that caches a cache provider per class loader in a concurrent map.
|
Simple(TypePool.Default.ReaderMode readerMode,
TypePool.Default.WithLazyResolution.LazinessMode lazinessMode,
ConcurrentMap<? super ClassLoader,TypePool.CacheProvider> cacheProviders)
Creates a new type locator that caches a cache provider per class loader in a concurrent map.
|
| Modifier and Type | Method and Description |
|---|---|
protected ClassLoader |
getBootstrapMarkerLoader()
Returns the class loader to serve as a cache key if a cache provider for the bootstrap class loader is requested.
|
protected TypePool.CacheProvider |
locate(ClassLoader classLoader)
Locates a cache provider for a given class loader.
|
typePool, typePoolpublic Simple(ConcurrentMap<? super ClassLoader,TypePool.CacheProvider> cacheProviders)
TypePool.Default.ReaderMode.cacheProviders - The concurrent map that is used for storing a cache provider per class loader.public Simple(TypePool.Default.ReaderMode readerMode, ConcurrentMap<? super ClassLoader,TypePool.CacheProvider> cacheProviders)
readerMode - The reader mode to use for parsing a class file.cacheProviders - The concurrent map that is used for storing a cache provider per class loader.public Simple(TypePool.Default.ReaderMode readerMode, TypePool.Default.WithLazyResolution.LazinessMode lazinessMode, ConcurrentMap<? super ClassLoader,TypePool.CacheProvider> cacheProviders)
readerMode - The reader mode to use for parsing a class file.lazinessMode - The laziness mode to use for when to parse a class file.cacheProviders - The concurrent map that is used for storing a cache provider per class loader.protected TypePool.CacheProvider locate(@MaybeNull ClassLoader classLoader)
AgentBuilder.PoolStrategy.WithTypePoolCachelocate in class AgentBuilder.PoolStrategy.WithTypePoolCacheclassLoader - The class loader for which to locate a cache. This class loader might
be null to represent the bootstrap loader.protected ClassLoader getBootstrapMarkerLoader()
Returns the class loader to serve as a cache key if a cache provider for the bootstrap class loader is requested.
This class loader is represented by null in the JVM which is an invalid value for many ConcurrentMap
implementations.
By default, a custom class loader is created to use as a marker.
Copyright © 2014–2025. All rights reserved.