docs: protected <K, V> Store<K, V> getStore(String alias, CacheConfiguration<K, V> config,
                                         Class<K> keyType, Class<V> valueType,
                                         Collection<ServiceConfiguration<?>> serviceConfigs,
                                         List<LifeCycled> lifeCycledList, CacheLoaderWriter<? super K, V> loaderWriter) {
  
      final Set<ResourceType<?>> resourceTypes = config.getResourcePools().getResourceTypeSet();
      for (ResourceType<?> resourceType : resourceTypes) {
        if (resourceType.isPersistable()) {
          final PersistableResourceService persistableResourceService = getPersistableResourceService(resourceType);
  
          try {
            final PersistableResourceService.PersistenceSpaceIdentifier<?> spaceIdentifier = persistableResourceService
                .getPersistenceSpaceIdentifier(alias, config);
            serviceConfigs.add(spaceIdentifier);
            lifeCycledList.add(new LifeCycledAdapter() {
              @Override
              public void close() throws Exception {
                persistableResourceService.releasePersistenceSpaceIdentifier(spaceIdentifier);
              }
            });
          } catch (CachePersistenceException e) {
            throw new RuntimeException("Unable to handle persistence", e);
          }
        }
      }
  
      Serializer<K> keySerializer = null;
      Serializer<V> valueSerializer = null;
      final SerializationProvider serialization = serviceLocator.getService(SerializationProvider.class);
      ServiceConfiguration<?>[] serviceConfigArray = serviceConfigs.toArray(new ServiceConfiguration<?>[serviceConfigs.size()]);
      if (serialization != null) {
        try {
          final Serializer<K> keySer = serialization.createKeySerializer(keyType, config.getClassLoader(), serviceConfigArray);
          lifeCycledList.add(new LifeCycledAdapter() {
            @Override
            public void close() throws Exception {
              serialization.releaseSerializer(keySer);
            }
          });
          keySerializer = keySer;
        } catch (UnsupportedTypeException e) {
          for (ResourceType<?> resource : resourceTypes) {
            if (resource.requiresSerialization()) {
              throw new RuntimeException(e);
            }
          }
          LOGGER.debug("Could not create serializers for {}", alias, e);
        }
        try {
          final Serializer<V> valueSer = serialization.createValueSerializer(valueType, config.getClassLoader(), serviceConfigArray);
          lifeCycledList.add(new LifeCycledAdapter() {
            @Override
            public void close() throws Exception {
              serialization.releaseSerializer(valueSer);
            }
          });
          valueSerializer = valueSer;
        } catch (UnsupportedTypeException e) {
          for (ResourceType<?> resource : resourceTypes) {
            if (resource.requiresSerialization()) {
              throw new RuntimeException(e);
            }
          }
          LOGGER.debug("Could not create serializers for {}", alias, e);
        }
      }
  
      Collection<ServiceConfiguration<?>> serviceConfigurations = config.getServiceConfigurations();
  
      int dispatcherConcurrency = findOptionalAmongst(StoreEventSourceConfiguration.class, serviceConfigurations)
        .map(StoreEventSourceConfiguration::getDispatcherConcurrency)
        .orElse(StoreEventSourceConfiguration.DEFAULT_DISPATCHER_CONCURRENCY);
  
      boolean operationStatisticsEnabled = findOptionalAmongst(StoreStatisticsConfiguration.class, serviceConfigurations)
        .map(StoreStatisticsConfiguration::isOperationStatisticsEnabled)
        // By default, we enable statistics only in a tiered environment
        .orElseGet(() -> config.getResourcePools().getResourceTypeSet().size() > 1);
  
      Store.Configuration<K, V> storeConfiguration = new StoreConfigurationImpl<>(config, dispatcherConcurrency,
        operationStatisticsEnabled, keySerializer, valueSerializer, loaderWriter, useLoaderInAtomics);
  
      Store.Provider storeProvider = StoreSupport.selectWrapperStoreProvider(serviceLocator, serviceConfigs);
      if (storeProvider == null) {
        storeProvider = StoreSupport.selectStoreProvider(serviceLocator, resourceTypes, serviceConfigs);
      }
  
      Store<K, V> store = storeProvider.createStore(storeConfiguration, serviceConfigArray);
  
      AtomicReference<Store.Provider> storeProviderRef = new AtomicReference<>(storeProvider);
  
      lifeCycledList.add(new LifeCycled() {
        @Override
        public void init() {
          storeProviderRef.get().initStore(store);
        }
  
        @Override
        public void close() {
          storeProviderRef.get().releaseStore(store);
        }
      });
  
      return store;
    }