docs: private void handleDiscoveryEvent(NodeDiscoveryEvent event) {
      switch (event.type()) {
        case JOIN:
          handleJoinEvent(event.subject());
          break;
        case LEAVE:
          handleLeaveEvent(event.subject());
          break;
        default:
          throw new AssertionError();
      }
    }