Retrieve a list of node Ids to use for the SCAN operation.

@param connection
@return
13720
private static List<String> getNodeIds(StatefulRedisClusterConnection<?, ?> connection) {
        List<String> nodeIds = new ArrayList<>();

        PartitionAccessor partitionAccessor = new PartitionAccessor(connection.getPartitions());
        for (RedisClusterNode redisClusterNode : partitionAccessor.getMasters()) {

            if (connection.getReadFrom() != null) {

                List<RedisNodeDescription> readCandidates = (List) partitionAccessor.getReadCandidates(redisClusterNode);

                List<RedisNodeDescription> selection = connection.getReadFrom().select(new ReadFrom.Nodes() {
                    @Override
                    public List<RedisNodeDescription> getNodes() {
                        return readCandidates;
                    }

                    @Override
                    public Iterator<RedisNodeDescription> iterator() {
                        return readCandidates.iterator();
                    }
                });

                if (!selection.isEmpty()) {
                    RedisClusterNode selectedNode = (RedisClusterNode) selection.get(0);
                    nodeIds.add(selectedNode.getNodeId());
                    continue;
                }
            }
            nodeIds.add(redisClusterNode.getNodeId());
        }
        return nodeIds;
    }
1047517
private function readMigrated(Connection $connection): array
    {
        $builder  = $connection->createQueryBuilder();
        $migrated = [];

        if ($connection->getSchemaManager()->tablesExist([static::MIGRATIONS_TABLE]) === true) {
            $migrations = $builder
                ->select(static::MIGRATIONS_COLUMN_ID, static::MIGRATIONS_COLUMN_CLASS)
                ->from(static::MIGRATIONS_TABLE)
                ->orderBy(static::MIGRATIONS_COLUMN_ID)
                ->execute()
                ->fetchAll();
            foreach ($migrations as $migration) {
                $index            = $migration[static::MIGRATIONS_COLUMN_ID];
                $class            = $migration[static::MIGRATIONS_COLUMN_CLASS];
                $migrated[$index] = $class;
            }
        }

        return $migrated;
    }
1345878
private static List<ConnectionNotation> getAllSelfCycleConnections(List<ConnectionNotation> connections) {
    List<ConnectionNotation> listSelfCycle = new ArrayList<ConnectionNotation>();
    for (ConnectionNotation connection : connections) {
      if ((connection.getTargetId().getId().equals(connection.getSourceId().getId()))) {
        listSelfCycle.add(connection);
      }
    }
    return listSelfCycle;
  }
1129428
public INDArray getById(int id) {
        return map.get(NodeDescriptor.builder().id(id).build());
    }
942596
public List<ConnectionInfo> getConnections() {
    final URI uri = uriWithPath("./connections/");
    return Arrays.asList(this.rt.getForObject(uri, ConnectionInfo[].class));
  }
515079
public Set<String> getAllNodeIDs() {
		HashSet<String> ids = new HashSet<>(nodes.keySet());
		ids.add(nodeID);
		return ids;
	}
113874
public List<String> documentIds() {
        List<String> documentIds = new ArrayList<String>();
        List<DocumentRevision> docs = CollectionUtils.newArrayList(iterator());
        for (DocumentRevision doc : docs) {
            documentIds.add(doc.getId());
        }
        return documentIds;
    }
770461
List<ConnectionListener> getConnectionListeners(ConnectionManager cm)
   {
      if (cmToCl == null)
         return Collections.unmodifiableList(Collections.emptyList());

      List<ConnectionListener> l = cmToCl.get(cm);
      if (l == null)
         l = Collections.emptyList();
      
      return Collections.unmodifiableList(l);
   }
1198233
public List<Connection> getConnections(final ConnectionMode connectionMode, final String dataSourceName, final int connectionSize) throws SQLException {
        if (stateHandler.isInTransaction()) {
            return getConnectionsWithTransaction(connectionMode, dataSourceName, connectionSize);
        } else {
            return getConnectionsWithoutTransaction(connectionMode, dataSourceName, connectionSize);
        }
    }
215596
public Set<Integer> getConnections(String endpointId) {
        return Collections.unmodifiableSet(this.entries.get(endpointId));
    }
1351754
private int getNumberOfNeighborConnections(int node) {
        int numberOfConnections = 0;

        // get the set of neighbors
        Set<Integer> neighbors = getNeighbors(node);

        if (neighbors.size() > 0) {
            // for each pair of neighbors, test if there is a connection
            Object[] nodeArray = neighbors.toArray();
            // sort the Array so we can use a simple iteration with two for loops to access all pairs
            Arrays.sort(nodeArray);

            for (int i=0; i<neighbors.size(); i++) {
                int outerNode = (Integer) nodeArray[i];
                for (int j=i+1; j<neighbors.size(); j++) {
                    int innerNode = (Integer) nodeArray[j];
                    // in case of a connection - increade connection counter
                    // order of the nodes doesn't matter for undirected graphs
                    if (undirectedGraph.containsEdge(innerNode, outerNode)) {
                        numberOfConnections++;
                    }
                }
            }
        }

//        logger.info(neighbors.size() + " - " + numberOfConnections);

        return numberOfConnections;
    }
1119708
public NodeList getNodeList(String expression) {
		return (NodeList) evalXPath(expression, null, XPathConstants.NODESET);
	}
108219
public List<ConnectionListener> getConnectionListeners() {
        if (changes == null) {
            return (List<ConnectionListener>)Collections.EMPTY_LIST;
        }

        List<EventListener> listeners = changes.getListenerList(AMQP);
        if ((listeners == null) || listeners.isEmpty()) {
            return (List<ConnectionListener>)Collections.EMPTY_LIST;
        }

        ArrayList<ConnectionListener> list = new ArrayList<ConnectionListener>();
        for (EventListener listener : listeners) {
            list.add((ConnectionListener)listener);
        }

        return list;
    }
197364
public java.util.List<OpenIDConnectProviderListEntry> getOpenIDConnectProviderList() {
        if (openIDConnectProviderList == null) {
            openIDConnectProviderList = new com.amazonaws.internal.SdkInternalList<OpenIDConnectProviderListEntry>();
        }
        return openIDConnectProviderList;
    }
455731
public String getId(Node node) {
        String id = null;
        try {
            id = node.getIdentifier();
        } catch (RepositoryException e) {
            id = node.toString(); // use Java 'ID'
        }
        return id;
    }
624843
def idmap_sync(connection):
	
	xmldoc = get_xml(connection)
	for tbl in xmldoc.getElementsByTagName(DBTable.tagName):
		tbl.sync_next_id()
	xmldoc.unlink()
906754
public List<Node> getConnectedNodes() {
        List<Node> nodes = new ArrayList<>();
        for (Link l : links) {
            if (l.getElement() instanceof Node) {
                nodes.add((Node) l.getElement());
            }
        }
        return nodes;
    }