Class WhileScoreResolver
- java.lang.Object
-
- uk.gov.gchq.gaffer.store.operation.resolver.WhileScoreResolver
-
- All Implemented Interfaces:
ScoreResolver<While>
public class WhileScoreResolver extends Object implements ScoreResolver<While>
AnWhileScoreResolver
is an implementation ofScoreResolver
for theWhile
operation.The score will be the maximum of the transform operation and the delegate operation, multiplied by the minimum of the configured number of max repeats vs the global maximum number of allowed repeats.
This is simply because the number of actual repetitions is nondeterministic, therefore a "worst"-case scenario is considered.
-
-
Constructor Summary
Constructors Constructor Description WhileScoreResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Integer
getScore(While operation)
Should return a (nullable) score for a given operation.Integer
getScore(While operation, ScoreResolver defaultScoreResolver)
Should return a (nullable) score for a given operation.
-
-
-
Method Detail
-
getScore
public Integer getScore(While operation)
Description copied from interface:ScoreResolver
Should return a (nullable) score for a given operation.- Specified by:
getScore
in interfaceScoreResolver<While>
- Parameters:
operation
- the provided operation for which the score should be resolved- Returns:
- the score for the operation, otherwise null if not found
-
getScore
public Integer getScore(While operation, ScoreResolver defaultScoreResolver)
Description copied from interface:ScoreResolver
Should return a (nullable) score for a given operation.- Specified by:
getScore
in interfaceScoreResolver<While>
- Parameters:
operation
- the provided operation for which the score should be resolveddefaultScoreResolver
- the default score resolver to look up scores for nested operations- Returns:
- the score for the operation, otherwise null if not found
-
-