public class CheckCacheForSpecificChildren extends Object implements ChildCacheFinder
FeatureCalculationInput
is available from another
LRU-cache and reuse.
This is used to "redirect" certain child-caches to reuse sessions elsewhere.
Constructor and Description |
---|
CheckCacheForSpecificChildren(Class<?> cacheInputType,
CacheTransferSourceCollection source) |
Modifier and Type | Method and Description |
---|---|
Optional<Set<ChildCacheName>> |
cachesToAvoidInvalidating()
If set, these particular-caches are exceptionally not invalidated during the typical
invalidation operation on their parent.
|
<V extends FeatureInput> |
childCacheFor(FeatureCalculationCache<?> parentCache,
CacheCreator factory,
ChildCacheName childName,
V input)
Selects a child-cache given a parent and a child-name.
|
ChildCacheFinder |
finderForGrandchild()
What finder to use for children-of-children?
|
public CheckCacheForSpecificChildren(Class<?> cacheInputType, CacheTransferSourceCollection source)
public <V extends FeatureInput> FeatureCalculationCache<V> childCacheFor(FeatureCalculationCache<?> parentCache, CacheCreator factory, ChildCacheName childName, V input) throws FeatureCalculationException
ChildCacheFinder
This may involve reusing an existing cache, or creating a new one, depending on the strategy.
childCacheFor
in interface ChildCacheFinder
V
- type-of-input to be used to calculate on the child-cacheparentCache
- the existing parent-cachefactory
- how to create new cacheschildName
- name of child-cacheinput
- input to be used for calculations on the child-cacheFeatureCalculationException
- if no child-cache exists or can be created for childCacheName
.public ChildCacheFinder finderForGrandchild()
ChildCacheFinder
finderForGrandchild
in interface ChildCacheFinder
public Optional<Set<ChildCacheName>> cachesToAvoidInvalidating()
ChildCacheFinder
If not-set, there are no exceptions.
cachesToAvoidInvalidating
in interface ChildCacheFinder
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.