class WrappingStoreProvider implements StateStoreProvider {

    @Override
    public <T> List<T> stores(final String storeName,
                              final QueryableStoreType<T> queryableStoreType) {
        final List<T> allStores = new ArrayList<>();
        for (final StreamThreadStateStoreProvider provider : storeProviders) {
            final List<T> stores = provider.stores(storeQueryParameters);
            allStores.addAll(stores);
        }
        if (allStores.isEmpty()) {
            throw new InvalidStateStoreException("The state store, " + storeName + ", may have migrated to another instance.");
        }
        return allStores;
    }

      WrappingStoreProvider(final List<StreamThreadStateStoreProvider> storeProviders,
                          final StoreQueryParameters storeQueryParameters);

}