public static class TypePool.CacheProvider.Simple.UsingSoftReference extends Object implements TypePool.CacheProvider
TypePool.Resolution.Simple cache provider that clears its storage if the heap is filled, by using a soft reference.TypePool.CacheProvider.Discriminating, TypePool.CacheProvider.NoOp, TypePool.CacheProvider.SimpleUNRESOLVED| Constructor and Description |
|---|
UsingSoftReference()
Creates a softly referenced
TypePool.Resolution.Simple cache provider. |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears this cache.
|
TypePool.Resolution |
find(String name)
Attempts to find a resolution in this cache.
|
TypePool.Resolution |
register(String name,
TypePool.Resolution resolution)
Registers a resolution in this cache.
|
public UsingSoftReference()
TypePool.Resolution.Simple cache provider.@MaybeNull public TypePool.Resolution find(String name)
find in interface TypePool.CacheProvidername - The name of the type to describe.null if no such resolution can be found in the cache.public TypePool.Resolution register(String name, TypePool.Resolution resolution)
register in interface TypePool.CacheProvidername - The name of the type that is to be registered.resolution - The resolution to register.public void clear()
clear in interface TypePool.CacheProviderCopyright © 2014–2025. All rights reserved.