This method creates a new list each time is called.

@return the list of peers
554128
public ArrayList<TcpEndpoint> peers() {
        tcp_endpoint_vector v = alert.peers();
        int size = (int) v.size();
        ArrayList<TcpEndpoint> peers = new ArrayList<>(size);

        for (int i = 0; i < size; i++) {
            tcp_endpoint endp = v.get(i);
            String ip = new Address(endp.address()).toString(); // clone
            peers.add(new TcpEndpoint(ip, endp.port()));
        }

        return peers;
    }
916450
public List<T> toList() {
        try {
            return StreamSupport.stream(Spliterators.spliteratorUnknownSize(this, Spliterator.ORDERED), false)
                    .collect(Collectors.toList());
        } finally {
            close();
        }
    }
10266
public ArrayList<DhtRoutingBucket> routingTable() {
        dht_routing_bucket_vector v = alert.getRouting_table();
        int size = (int) v.size();
        ArrayList<DhtRoutingBucket> l = new ArrayList<>(size);

        for (int i = 0; i < size; i++) {
            l.add(new DhtRoutingBucket(v.get(i)));
        }

        return l;
    }
850606
public List<SyncPointInfo> getSyncPathList() {
    List<SyncPointInfo> returnList = new ArrayList<>();
    for (AlluxioURI uri: mSyncPathList) {
      SyncPointInfo.SyncStatus status;
      Future<?> syncStatus = mSyncPathStatus.get(uri);
      if (syncStatus == null) {
        status = SyncPointInfo.SyncStatus.NOT_INITIALLY_SYNCED;
      } else if (syncStatus.isDone()) {
        status = SyncPointInfo.SyncStatus.INITIALLY_SYNCED;
      } else {
        status = SyncPointInfo.SyncStatus.SYNCING;
      }
      returnList.add(new SyncPointInfo(uri, status));
    }
    return returnList;
  }
528274
@Override
    public java.util.concurrent.Future<ListPublicKeysResult> listPublicKeysAsync(
            com.amazonaws.handlers.AsyncHandler<ListPublicKeysRequest, ListPublicKeysResult> asyncHandler) {

        return listPublicKeysAsync(new ListPublicKeysRequest(), asyncHandler);
    }
1327409
def runListPeers(self, request):
        
        return self.runSearchRequest(
            request,
            protocol.ListPeersRequest,
            protocol.ListPeersResponse,
            self.peersGenerator)
995053
public java.util.List<String> getInstancesList() {
        if (instancesList == null) {
            instancesList = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return instancesList;
    }
429978
public java.util.List<String> getAZList() {
        if (aZList == null) {
            aZList = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return aZList;
    }
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());
	}
1308003
public java.util.List<String> getPublicIps() {
        if (publicIps == null) {
            publicIps = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return publicIps;
    }
65948
public List<Next<Flow<T>>> getAllNext()
   {
      List<Next<Flow<T>>> list = new ArrayList<Next<Flow<T>>>();
      List<Node> nodeList = childNode.get("next");
      for(Node node: nodeList)
      {
         Next<Flow<T>>  type = new NextImpl<Flow<T>>(this, "next", childNode, node);
         list.add(type);
      }
      return list;
   }
1264106
public java.util.List<LifecycleHook> getLifecycleHooks() {
        if (lifecycleHooks == null) {
            lifecycleHooks = new com.amazonaws.internal.SdkInternalList<LifecycleHook>();
        }
        return lifecycleHooks;
    }
351287
public List<T> pollAll() {
    List<T> retList = new ArrayList<T>(size);
    pollAllToList(retList);
    return retList;
  }
1184643
public java.util.List<BGPPeer> getBgpPeers() {
        if (bgpPeers == null) {
            bgpPeers = new com.amazonaws.internal.SdkInternalList<BGPPeer>();
        }
        return bgpPeers;
    }
1083171
public ArrayList<DatanodeDescriptor> getDecommissioningNodesList() {

    try {
      return getDecommissioningNodesList(getDatanodeListForReport(DatanodeReportType.LIVE));
    } catch (Exception e) {
      return new ArrayList<DatanodeDescriptor>();
    }
  }
548318
public java.util.List<String> getGroupList() {
        if (groupList == null) {
            groupList = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return groupList;
    }
1339093
public synchronized List getList() {
        if (tc.isEntryEnabled())
            SibTr.entry(tc, "getList");

        // Remove a List from the pool
        List list = (List) listPool.remove();

        // If the list is null then there was none available in the pool
        // So create a new one
        if (list == null) {
            if (tc.isDebugEnabled())
                SibTr.debug(tc, "No list available from pool - creating a new one");

            // We could change the list implementation here if we wanted         
            list = new ArrayList(5);
        }

        if (tc.isEntryEnabled())
            SibTr.exit(tc, "getList");

        return list;
    }