Tabnine Logo
LookupService.getMatchingNodes
Code IndexAdd Tabnine to your IDE (free)

How to use
getMatchingNodes
method
in
com.netflix.spinnaker.halyard.config.services.v1.LookupService

Best Java code snippets using com.netflix.spinnaker.halyard.config.services.v1.LookupService.getMatchingNodes (Showing top 4 results out of 315)

origin: com.netflix.spinnaker.halyard/halyard-config

/**
 * Given a node filter and a node type, find all nodes that match both the filter and the type of the Node.
 * @param filter is the filter to lookup by.
 * @param clazz is the class of the node type we want to find.
 * @return the nodes matching the filter and clazz.
 */
public <T extends Node> List<T> getMatchingNodesOfType(NodeFilter filter, Class<T> clazz) {
 Halconfig halconfig = parser.getHalconfig();
 return getMatchingNodes(halconfig, filter)
   .stream()
   .filter(clazz::isInstance)
   .map(n -> (T) n)
   .collect(Collectors.toList());
}
origin: spinnaker/halyard

/**
 * Given a node filter and a node type, find all nodes that match both the filter and the type of the Node.
 * @param filter is the filter to lookup by.
 * @param clazz is the class of the node type we want to find.
 * @return the nodes matching the filter and clazz.
 */
public <T extends Node> List<T> getMatchingNodesOfType(NodeFilter filter, Class<T> clazz) {
 Halconfig halconfig = parser.getHalconfig();
 return getMatchingNodes(halconfig, filter)
   .stream()
   .filter(clazz::isInstance)
   .map(n -> (T) n)
   .collect(Collectors.toList());
}
origin: com.netflix.spinnaker.halyard/halyard-config

/**
 * @param node is the node whose children we want to find.
 * @param filter is the filter to lookup by.
 * @return the children of the input node matching the filter.
 */
private List<Node> getMatchingNodes(Node node, NodeFilter filter) {
 log.trace("Checking for leaf nodes of node " + node.getNodeName());
 List<Node> result = new ArrayList<>();
 NodeIterator children = node.getChildren();
 Node recurse = children.getNext(filter);
 while (recurse != null) {
  result.addAll(getMatchingNodes(recurse, filter));
  recurse = children.getNext(filter);
 }
 // If we have visited this node, it must have matched the filter.
 result.add(node);
 return result;
}
origin: spinnaker/halyard

/**
 * @param node is the node whose children we want to find.
 * @param filter is the filter to lookup by.
 * @return the children of the input node matching the filter.
 */
private List<Node> getMatchingNodes(Node node, NodeFilter filter) {
 log.trace("Checking for leaf nodes of node " + node.getNodeName());
 List<Node> result = new ArrayList<>();
 NodeIterator children = node.getChildren();
 Node recurse = children.getNext(filter);
 while (recurse != null) {
  result.addAll(getMatchingNodes(recurse, filter));
  recurse = children.getNext(filter);
 }
 // If we have visited this node, it must have matched the filter.
 result.add(node);
 return result;
}
com.netflix.spinnaker.halyard.config.services.v1LookupServicegetMatchingNodes

Popular methods of LookupService

  • getMatchingNodesOfType
    Given a node filter and a node type, find all nodes that match both the filter and the type of the N
  • getSingularNodeOrDefault

Popular in Java

  • Creating JSON documents from java classes using gson
  • setRequestProperty (URLConnection)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • putExtra (Intent)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • JFileChooser (javax.swing)
  • JLabel (javax.swing)
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now