Class AgentCachingPoolStrategy
- java.lang.Object
-
- io.opentelemetry.javaagent.tooling.muzzle.AgentCachingPoolStrategy
-
- All Implemented Interfaces:
net.bytebuddy.agent.builder.AgentBuilder.PoolStrategy
public class AgentCachingPoolStrategy extends Object implements net.bytebuddy.agent.builder.AgentBuilder.PoolStrategy
-
There two core parts to the cache...
- a cache of ClassLoader to WeakReference<ClassLoader>
- a single cache of TypeResolutions for all ClassLoaders - keyed by a custom composite key of ClassLoader and class name
This design was chosen to create a single limited size cache that can be adjusted for the entire application -- without having to create a large number of WeakReference objects.
Eviction is handled through a size restriction
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.agent.builder.AgentBuilder.PoolStrategy
net.bytebuddy.agent.builder.AgentBuilder.PoolStrategy.ClassLoading, net.bytebuddy.agent.builder.AgentBuilder.PoolStrategy.Default, net.bytebuddy.agent.builder.AgentBuilder.PoolStrategy.Eager, net.bytebuddy.agent.builder.AgentBuilder.PoolStrategy.WithTypePoolCache
-
-
Constructor Summary
Constructors Constructor Description AgentCachingPoolStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description net.bytebuddy.pool.TypePooltypePool(net.bytebuddy.dynamic.ClassFileLocator classFileLocator, ClassLoader classLoader)net.bytebuddy.pool.TypePooltypePool(net.bytebuddy.dynamic.ClassFileLocator classFileLocator, ClassLoader classLoader, String name)
-
-
-
Method Detail
-
typePool
public final net.bytebuddy.pool.TypePool typePool(net.bytebuddy.dynamic.ClassFileLocator classFileLocator, ClassLoader classLoader)- Specified by:
typePoolin interfacenet.bytebuddy.agent.builder.AgentBuilder.PoolStrategy
-
typePool
public final net.bytebuddy.pool.TypePool typePool(net.bytebuddy.dynamic.ClassFileLocator classFileLocator, ClassLoader classLoader, String name)- Specified by:
typePoolin interfacenet.bytebuddy.agent.builder.AgentBuilder.PoolStrategy
-
-