@Override
    public RegisteredService delete(final long id) {
        return lock.tryLock(() -> {
            val service = findServiceBy(id);
            return delete(service);
        });
    }
This is {@link AbstractServicesManager}.

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