public void persist()

in mode/cluster/repository/nacos/src/main/java/org/apache/shardingsphere/mode/repository/cluster/nacos/NacosRepository.java [204:216]


    public void persist(final String key, final String value) {
        try {
            Preconditions.checkNotNull(value, "Value can not be null");
            Optional<Instance> instance = findExistedInstance(key, false).stream().max(Comparator.comparing(NacosMetaDataUtils::getTimestamp));
            if (instance.isPresent()) {
                update(instance.get(), value);
            } else {
                put(key, value, false);
            }
        } catch (final NacosException ex) {
            throw new ClusterRepositoryPersistException(ex);
        }
    }