private void saveRegisteredServiceIfNecessary(final ServiceRegistry serviceRegistry, final RegisteredService value) {
        if (properties.getCore().getReplicationMode() == StreamingServicesCoreProperties.ReplicationModes.ACTIVE) {
            serviceRegistry.save(value);
        }
    }
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