public boolean add(final Peer peer) {
    checkArgument(
        peer.getEnodeURL().isListening(),
        "Invalid enode url.  Enode url must contain a non-zero listening port.");
    final boolean wasAdded = maintainedPeers.add(peer);
    addedSubscribers.forEach(s -> s.onPeerAdded(peer, wasAdded));
    return wasAdded;
  }
Represents a set of peers for which connections should be actively maintained.
ethereum/p2p/src/main/java/org/hyperledger/besu/ethereum/p2p/peers/MaintainedPeers.java