code: public Optional<CacheStatistics> getStatistics(String cacheName) {
  
          javax.cache.Cache cache = cacheManager.getCache(cacheName);
  
          if (cache == null) {
              return Optional.empty();
          }
  
          if (((CompleteConfiguration) cache.getConfiguration(CompleteConfiguration.class)).isStatisticsEnabled() && cache instanceof ICache) {
              com.hazelcast.cache.CacheStatistics stats = ((ICache) cache).getLocalCacheStatistics();
              CacheStatistics statistics = new CacheStatistics(
                      stats.getCacheHits(),
                      stats.getCacheMisses(),
                      stats.getCacheHitPercentage(),
                      stats.getCacheMissPercentage(),
                      stats.getCacheGets(),
                      stats.getCachePuts(),
                      stats.getCacheRemovals(),
                      stats.getCacheEvictions(),
                      stats.getAverageGetTime(),
                      stats.getAveragePutTime(),
                      stats.getAverageRemoveTime());
  
              return Optional.of(statistics);
          }
  
          return Optional.empty();
      }
docs: Get a cache statistic information if available
  
  @param cacheName name of cache
  @return cache statistics or <code>Optional.empty()</code> if either cache does exist or does not provide statistics datas