Get the peers for this channel.

@return the peers.
179081
public Collection<Peer> getPeers(EnumSet<PeerRole> roles) {

        Set<Peer> ret = new HashSet<>(getPeers().size());

        for (PeerRole peerRole : roles) {
            ret.addAll(peerRoleSetMap.get(peerRole));
        }

        return Collections.unmodifiableCollection(ret);
    }
752317
Collection<AsteriskChannel> getChannels()
    {
        Collection<AsteriskChannel> copy;

        synchronized (channels)
        {
            copy = new ArrayList<>(channels.size() + 2);
            for (AsteriskChannel channel : channels.values())
            {
                if (channel.getState() != ChannelState.HUNGUP)
                {
                    copy.add(channel);
                }
            }
        }
        return copy;
    }
1236124
public java.util.List<IpRange> getIpv4Ranges() {
        if (ipv4Ranges == null) {
            ipv4Ranges = new com.amazonaws.internal.SdkInternalList<IpRange>();
        }
        return ipv4Ranges;
    }
283830
public java.util.List<String> getNatGatewayIds() {
        if (natGatewayIds == null) {
            natGatewayIds = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return natGatewayIds;
    }
945047
public ClientsResult calculateAllNodesResult() {
		final List<String> childNodePaths = getChildren(electionRootPath, false);
		_logger.info("Total peers = {} ", childNodePaths.size());
		Collections.sort(childNodePaths);

		int index = childNodePaths.indexOf(clientNodePath.substring(clientNodePath.lastIndexOf('/') + 1));
		return new ClientsResult(index, childNodePaths.size());
	}
1299444
public java.util.List<IPRange> getIPRanges() {
        if (iPRanges == null) {
            iPRanges = new com.amazonaws.internal.SdkInternalList<IPRange>();
        }
        return iPRanges;
    }
910657
public Client getPeerClient (String nodeName)
    {
        PeerNode peer = _peers.get(nodeName);
        return (peer == null) ? null : peer.getClient();
    }
701277
public java.util.List<VpnConnection> getVpnConnections() {
        if (vpnConnections == null) {
            vpnConnections = new com.amazonaws.internal.SdkInternalList<VpnConnection>();
        }
        return vpnConnections;
    }
197100
protected int discoverPeers() {
        // Don't hold the lock whilst doing peer discovery: it can take a long time and cause high API latency.
        checkState(!lock.isHeldByCurrentThread());
        int maxPeersToDiscoverCount = this.vMaxPeersToDiscoverCount;
        long peerDiscoveryTimeoutMillis = this.vPeerDiscoveryTimeoutMillis;
        final Stopwatch watch = Stopwatch.createStarted();
        final List<PeerAddress> addressList = Lists.newLinkedList();
        for (PeerDiscovery peerDiscovery : peerDiscoverers /* COW */) {
            InetSocketAddress[] addresses;
            try {
                addresses = peerDiscovery.getPeers(requiredServices, peerDiscoveryTimeoutMillis, TimeUnit.MILLISECONDS);
            } catch (PeerDiscoveryException e) {
                log.warn(e.getMessage());
                continue;
            }
            for (InetSocketAddress address : addresses) addressList.add(new PeerAddress(params, address));
            if (addressList.size() >= maxPeersToDiscoverCount) break;
        }
        if (!addressList.isEmpty()) {
            for (PeerAddress address : addressList) {
                addInactive(address);
            }
            final ImmutableSet<PeerAddress> peersDiscoveredSet = ImmutableSet.copyOf(addressList);
            for (final ListenerRegistration<PeerDiscoveredEventListener> registration : peerDiscoveredEventListeners /* COW */) {
                registration.executor.execute(new Runnable() {
                    @Override
                    public void run() {
                        registration.listener.onPeersDiscovered(peersDiscoveredSet);
                    }
                });
            }
        }
        watch.stop();
        log.info("Peer discovery took {} and returned {} items", watch, addressList.size());
        return addressList.size();
    }
99357
public java.util.List<NatGateway> getNatGateways() {
        if (natGateways == null) {
            natGateways = new com.amazonaws.internal.SdkInternalList<NatGateway>();
        }
        return natGateways;
    }
321896
public java.util.List<IpPermission> getIpPermissions() {
        if (ipPermissions == null) {
            ipPermissions = new com.amazonaws.internal.SdkInternalList<IpPermission>();
        }
        return ipPermissions;
    }
925351
def get_ntp_peers(self):
        """"""
        ntp_stats = self.get_ntp_stats()

        return {
            ntp_peer.get("remote"): {}
            for ntp_peer in ntp_stats
            if ntp_peer.get("remote")
        }
964909
public List<ChannelInfo> getChannels() {
    final URI uri = uriWithPath("./channels/");
    return Arrays.asList(this.rt.getForObject(uri, ChannelInfo[].class));
  }
1047302
public List<Peer> getSomePeers(Peer peer) {
    List<Peer> peers = new LinkedList<Peer>();

    // Extract answerPeers random peers
    List<TrackedPeer> candidates = new LinkedList<TrackedPeer>(this.peers.values());
    Collections.shuffle(candidates);

    int count = 0;
    for (TrackedPeer candidate : candidates) {
      // Don't include the requesting peer in the answer.
      if (peer != null && peer.looksLike(candidate)) {
        continue;
      }

      // Only serve at most ANSWER_NUM_PEERS peers
      if (count++ > this.answerPeers) {
        break;
      }

      peers.add(candidate);
    }

    return peers;
  }
527864
public java.util.List<SuggesterStatus> getSuggesters() {
        if (suggesters == null) {
            suggesters = new com.amazonaws.internal.SdkInternalList<SuggesterStatus>();
        }
        return suggesters;
    }
214234
public Set<String> queryChannels(Peer peer) throws InvalidArgumentException, ProposalException {

        clientCheck();

        if (null == peer) {

            throw new InvalidArgumentException("peer set to null");

        }

        //Run this on a system channel.

        try {
            Channel systemChannel = Channel.newSystemChannel(this);

            return systemChannel.queryChannels(peer);
        } catch (InvalidArgumentException e) {
            throw e; //dont log
        } catch (ProposalException e) {
            logger.error(format("queryChannels for peer %s failed." + e.getMessage(), peer.getName()), e);
            throw e;
        }

    }
537882
public java.util.List<String> getVpcPeeringConnectionIds() {
        if (vpcPeeringConnectionIds == null) {
            vpcPeeringConnectionIds = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return vpcPeeringConnectionIds;
    }