Search in sources :

Example 1 with WhileScoreResolver

use of uk.gov.gchq.gaffer.store.operation.resolver.WhileScoreResolver in project Gaffer by gchq.

the class ScoreOperationChainHandler method addDefaultScoreResolvers.

/**
 * Adds Gaffer's native {@link ScoreResolver} implementations to the list of available <code>ScoreResolver</code>s.
 * Any new implementations should be added to the map in this method, along with their respective class.
 *
 * @return a map of Operation class to ScoreResolver implementation
 */
private static Map<Class<? extends Operation>, ScoreResolver> addDefaultScoreResolvers() {
    final Map<Class<? extends Operation>, ScoreResolver> defaultResolvers = new HashMap<>();
    defaultResolvers.put(NamedOperation.class, new NamedOperationScoreResolver());
    defaultResolvers.put(If.class, new IfScoreResolver());
    defaultResolvers.put(While.class, new WhileScoreResolver());
    return Collections.unmodifiableMap(defaultResolvers);
}
Also used : NamedOperationScoreResolver(uk.gov.gchq.gaffer.store.operation.resolver.named.NamedOperationScoreResolver) DefaultScoreResolver(uk.gov.gchq.gaffer.store.operation.resolver.DefaultScoreResolver) ScoreResolver(uk.gov.gchq.gaffer.store.operation.resolver.ScoreResolver) WhileScoreResolver(uk.gov.gchq.gaffer.store.operation.resolver.WhileScoreResolver) IfScoreResolver(uk.gov.gchq.gaffer.store.operation.resolver.IfScoreResolver) HashMap(java.util.HashMap) LinkedHashMap(java.util.LinkedHashMap) IfScoreResolver(uk.gov.gchq.gaffer.store.operation.resolver.IfScoreResolver) NamedOperationScoreResolver(uk.gov.gchq.gaffer.store.operation.resolver.named.NamedOperationScoreResolver) NamedOperation(uk.gov.gchq.gaffer.named.operation.NamedOperation) Operation(uk.gov.gchq.gaffer.operation.Operation) WhileScoreResolver(uk.gov.gchq.gaffer.store.operation.resolver.WhileScoreResolver)

Aggregations

HashMap (java.util.HashMap)1 LinkedHashMap (java.util.LinkedHashMap)1 NamedOperation (uk.gov.gchq.gaffer.named.operation.NamedOperation)1 Operation (uk.gov.gchq.gaffer.operation.Operation)1 DefaultScoreResolver (uk.gov.gchq.gaffer.store.operation.resolver.DefaultScoreResolver)1 IfScoreResolver (uk.gov.gchq.gaffer.store.operation.resolver.IfScoreResolver)1 ScoreResolver (uk.gov.gchq.gaffer.store.operation.resolver.ScoreResolver)1 WhileScoreResolver (uk.gov.gchq.gaffer.store.operation.resolver.WhileScoreResolver)1 NamedOperationScoreResolver (uk.gov.gchq.gaffer.store.operation.resolver.named.NamedOperationScoreResolver)1