Class CheckCacheForSpecificChildren
Object
CheckCacheForSpecificChildren
- All Implemented Interfaces:
ChildCacheFinder
For particular child-caches, check if a
FeatureCalculationInput
is available from another
LRU-cache and reuse.
This is used to "redirect" certain child-caches to reuse sessions elsewhere.
- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionCheckCacheForSpecificChildren
(Class<?> cacheInputType, CacheTransferSourceCollection source) -
Method Summary
Modifier and TypeMethodDescriptionIf set, these particular-caches are exceptionally not invalidated during the typical invalidation operation on their parent.<V extends FeatureInput>
FeatureCalculationCache<V> childCacheFor
(FeatureCalculationCache<?> parentCache, CacheCreator factory, ChildCacheName childName, V input) Selects a child-cache given a parent and a child-name.What finder to use for children-of-children?
-
Constructor Details
-
CheckCacheForSpecificChildren
-
-
Method Details
-
childCacheFor
public <V extends FeatureInput> FeatureCalculationCache<V> childCacheFor(FeatureCalculationCache<?> parentCache, CacheCreator factory, ChildCacheName childName, V input) throws FeatureCalculationException Description copied from interface:ChildCacheFinder
Selects a child-cache given a parent and a child-name.This may involve reusing an existing cache, or creating a new one, depending on the strategy.
- Specified by:
childCacheFor
in interfaceChildCacheFinder
- Type Parameters:
V
- type-of-input to be used to calculate on the child-cache- Parameters:
parentCache
- the existing parent-cachefactory
- how to create new cacheschildName
- name of child-cacheinput
- input to be used for calculations on the child-cache- Returns:
- an existing or newly created child-cache depending on the strategy.
- Throws:
FeatureCalculationException
- if no child-cache exists or can be created forchildCacheName
.
-
finderForGrandchild
Description copied from interface:ChildCacheFinder
What finder to use for children-of-children?- Specified by:
finderForGrandchild
in interfaceChildCacheFinder
- Returns:
- the finder to use.
-
cachesToAvoidInvalidating
Description copied from interface:ChildCacheFinder
If set, these particular-caches are exceptionally not invalidated during the typical invalidation operation on their parent.If not-set, there are no exceptions.
- Specified by:
cachesToAvoidInvalidating
in interfaceChildCacheFinder
- Returns:
- the names of the caches that are exceptionally not invalidated, if any exist.
-