Class NamedOperationScoreResolver
- java.lang.Object
-
- uk.gov.gchq.gaffer.store.operation.resolver.named.NamedOperationScoreResolver
-
- All Implemented Interfaces:
ScoreResolver<NamedOperation>
public class NamedOperationScoreResolver extends Object implements ScoreResolver<NamedOperation>
ANamedOperationScoreResolver
will resolve the custom Operation Score for a providedNamedOperation
by searching for it within theNamedOperationCache
.
-
-
Constructor Summary
Constructors Constructor Description NamedOperationScoreResolver(String suffixNamedOperationCacheName)
NamedOperationScoreResolver(NamedOperationCache cache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Integer
getScore(NamedOperation operation)
Should return a (nullable) score for a given operation.Integer
getScore(NamedOperation operation, ScoreResolver defaultScoreResolver)
Should return a (nullable) score for a given operation.String
getSuffixCacheName()
-
-
-
Constructor Detail
-
NamedOperationScoreResolver
public NamedOperationScoreResolver(String suffixNamedOperationCacheName)
- Parameters:
suffixNamedOperationCacheName
- the suffix of NamedOperationCache to score against.
-
NamedOperationScoreResolver
public NamedOperationScoreResolver(NamedOperationCache cache)
-
-
Method Detail
-
getSuffixCacheName
public String getSuffixCacheName()
-
getScore
public Integer getScore(NamedOperation operation)
Description copied from interface:ScoreResolver
Should return a (nullable) score for a given operation.- Specified by:
getScore
in interfaceScoreResolver<NamedOperation>
- 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(NamedOperation operation, ScoreResolver defaultScoreResolver)
Description copied from interface:ScoreResolver
Should return a (nullable) score for a given operation.- Specified by:
getScore
in interfaceScoreResolver<NamedOperation>
- 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
-
-