@Override
    protected CacheStatistics[] getStatistics() {
        val hazelcastInstance = (HazelcastInstanceProxy) instance.getObject();
        val stats = hazelcastInstance.getConfig().getMapConfigs().keySet();
        val statsList = new ArrayList<CacheStatistics>(stats.size());
        stats.forEach(key -> {
            val map = hazelcastInstance.getMap(key);
            val memoryStats = hazelcastInstance.getOriginal().getMemoryStats();
            LOGGER.debug("Starting to collect hazelcast statistics for map [{}] identified by key [{}]...", map, key);
            statsList.add(new HazelcastStatistics(map, hazelcastInstance.getCluster().getMembers().size(), memoryStats));
        });
        return statsList.toArray(CacheStatistics[]::new);
    }
This is {@link HazelcastHealthIndicator}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-hazelcast-monitor/src/main/java/org/apereo/cas/monitor/HazelcastHealthIndicator.java