public static Set<String> getInMemoryStoreNames(
      Map<String, StorageEngineFactory<Object, Object>> storageEngineFactories,
      Config config) {
    StorageConfig storageConfig = new StorageConfig(config);
    return storageEngineFactories.keySet().stream()
        .filter(storeName -> {
          Optional<String> storeFactory = storageConfig.getStorageFactoryClassName(storeName);
          return storeFactory.isPresent() && storeFactory.get()
              .equals(StorageConfig.INMEMORY_KV_STORAGE_ENGINE_FACTORY);
        })
        .collect(Collectors.toSet());
  }
Method to instantiate a StorageEngine with the given parameters, and populate the storeDirectory paths (used to monitor
disk space).
samza-core/src/main/scala/org/apache/samza/storage/ContainerStorageManagerUtil.java