@Override
    public RegisteredService save(final RegisteredService rs) {
        try {
            rs.assignIdIfNecessary();
            val data = serializer.toString(rs);
            invokeServiceRegistryListenerPreSave(rs);
            val options = InsertOptions.builder()
                .consistencyLevel(DefaultConsistencyLevel.valueOf(properties.getConsistencyLevel()))
                .serialConsistencyLevel(DefaultConsistencyLevel.valueOf(properties.getSerialConsistencyLevel()))
                .timeout(Beans.newDuration(properties.getTimeout()))
                .build();
            val result = cassandraSessionFactory.getCassandraTemplate()
                .insert(new CassandraRegisteredServiceHolder(rs.getId(), data), options);
            return serializer.from(result.getEntity().getData());
        } catch (final Exception e) {
            LoggingUtils.error(LOGGER, e);
        }
        return rs;
    }
This is {@link CassandraServiceRegistry}.

@author Misagh Moayyed
@since 6.1.0
support/cas-server-support-cassandra-service-registry/src/main/java/org/apereo/cas/services/cassandra/CassandraServiceRegistry.java