@Bean
        @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        public DistributedCacheManager<RegisteredService, DistributedCacheObject<RegisteredService>, PublisherIdentifier> registeredServiceDistributedCacheManager(
            final ConfigurableApplicationContext applicationContext,
            @Qualifier("casRegisteredServiceHazelcastInstance")
            final HazelcastInstance casRegisteredServiceHazelcastInstance) {
            return BeanSupplier.of(DistributedCacheManager.class)
                .when(CONDITION.given(applicationContext.getEnvironment()))
                .supply(() -> {
                    val mapName = casRegisteredServiceHazelcastInstance.getConfig().getMapConfigs().keySet().iterator().next();
                    LOGGER.debug("Retrieving Hazelcast map [{}] for service replication", mapName);
                    return new RegisteredServiceHazelcastDistributedCacheManager(casRegisteredServiceHazelcastInstance,
                        casRegisteredServiceHazelcastInstance.getMap(mapName));
                })
                .otherwiseProxy()
                .get();
        }
This is {@link CasServicesStreamingHazelcastAutoConfiguration}.

@author Misagh Moayyed
@since 5.2.0
support/cas-server-support-service-registry-stream-hazelcast/src/main/java/org/apereo/cas/config/CasServicesStreamingHazelcastAutoConfiguration.java