You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2019/01/29 22:49:17 UTC

[GitHub] ottobackwards commented on a change in pull request #3277: NIFI-5801: Improved performance of Expression Language evaluation by …

ottobackwards commented on a change in pull request #3277: NIFI-5801: Improved performance of Expression Language evaluation by …
URL: https://github.com/apache/nifi/pull/3277#discussion_r252051248
 
 

 ##########
 File path: nifi-commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/MultiValueLookup.java
 ##########
 @@ -0,0 +1,181 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.attribute.expression.language;
+
+import org.apache.nifi.flowfile.FlowFile;
+import org.apache.nifi.registry.VariableDescriptor;
+import org.apache.nifi.registry.VariableRegistry;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+public class MultiValueLookup implements ValueLookup {
+    final List<Map<String, String>> maps = new ArrayList<>();
+    final VariableRegistry registry;
+
+    /**
+     * Constructs a ValueLookup where values are looked up first based any
+     * provided additional maps, then flowfile properties, then flowfile
+     * attributes, then based on the provided variable registry. The lookup is
+     * immutable and operations which attempt to alter state will throw
+     * UnsupportedOperationException
+     *
 
 Review comment:
   Is this class thread safe?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services