private void updateServiceRegistryWithMatchingService(final List<RegisteredService> services,
                                                          final RegisteredService cachedService,
                                                          final RegisteredService matchingService,
                                                          final ServiceRegistry serviceRegistry) {
        LOGGER.debug("Found corresponding service definition [{}] locally via cache manager [{}]", matchingService, distributedCacheManager.getName());
        if (matchingService.equals(cachedService)) {
            LOGGER.debug("Service definition cache entry [{}] is the same as service definition found locally [{}]", cachedService, matchingService);
        } else {
            LOGGER.debug("Service definition found in the cache [{}] is more recent than its counterpart on this CAS node. "
                         + "CAS will update the service registry of this CAS node with the cache entry for future look-ups", cachedService);
            updateServiceRegistryWithRegisteredService(services, cachedService, serviceRegistry);
        }
    }
This is {@link DefaultRegisteredServiceReplicationStrategy}.

@author Misagh Moayyed
@since 5.2.0
core/cas-server-core-services-registry/src/main/java/org/apereo/cas/services/replication/DefaultRegisteredServiceReplicationStrategy.java