Class Reflection.CachedClassResolver
- java.lang.Object
-
- hudson.plugins.project_inheritance.util.Reflection.CachedClassResolver
-
- Enclosing class:
- Reflection
protected static class Reflection.CachedClassResolver extends Object
This is a cache for loading classes by their name. It is supposed to reduce contention on the class-loader which otherwise might become a bottleneck.You can (and should) give it a timeout after which the resolution will be considered "stale" and refreshed. You can omit this in case you believe that class resolution will remain stable over the entire runtime.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
Reflection.CachedClassResolver.CacheEntry
A single entry for the cache that can be checked for freshness
-
Field Summary
Fields Modifier and Type Field Description protected Long
maxAge
protected ConcurrentHashMap<String,Reflection.CachedClassResolver.CacheEntry>
resolveMap
-
Constructor Summary
Constructors Constructor Description CachedClassResolver()
Creates a class resolver that does not clear its entries.CachedClassResolver(Long maxAge)
-
-
-
Field Detail
-
resolveMap
protected final ConcurrentHashMap<String,Reflection.CachedClassResolver.CacheEntry> resolveMap
-
maxAge
protected final Long maxAge
-
-
Constructor Detail
-
CachedClassResolver
public CachedClassResolver()
Creates a class resolver that does not clear its entries.
-
CachedClassResolver
public CachedClassResolver(Long maxAge)
-
-