Interface ReplaceStrategy<T extends FeatureInput>
- Type Parameters:
T
- the feature input-type
- All Known Implementing Classes:
AlwaysNew
,CacheAndReuseStrategy
,ReuseSingletonStrategy
public interface ReplaceStrategy<T extends FeatureInput>
Different strategies on associating a
FeatureCalculationInput
with a particular
input
.
A new FeatureCalculationInput
may be created, or an existing one reused - with or
without invalidating it.
Depending on the relationships that may exist between successive inputs that are calculated, particular caching strategies can be used to avoid repeating redundant calculation. This class provides an abstract interface for one aspect of that relationship.
- Author:
- Owen
-
Method Summary
Modifier and TypeMethodDescriptioncreateOrReuse
(T input) Find or create aFeatureCalculationInput
to associate withinput
.
-
Method Details
-
createOrReuse
Find or create aFeatureCalculationInput
to associate withinput
.- Parameters:
input
- the input that aFeatureCalculationInput
will be associated with.- Returns:
- the
FeatureCalculationInput
, either newly created, or reused from a previous call. - Throws:
OperationFailedException
- if an error-state emerge
-