class ShardStrategyFactory {

    public ShardStrategy getStrategy(final YangInstanceIdentifier path) {
        // try with the legacy module based shard mapping
        final String moduleName = getModuleName(requireNonNull(path, "path should not be null"));
        final ShardStrategy shardStrategy = configuration.getStrategyForModule(moduleName);
        if (shardStrategy == null) {
            // retry with prefix based sharding
            final ShardStrategy strategyForPrefix =
                    configuration.getStrategyForPrefix(new DOMDataTreeIdentifier(logicalStoreType, path));
            if (strategyForPrefix == null) {
                return DefaultShardStrategy.getInstance();
            }
            return strategyForPrefix;
        }

        return shardStrategy;
    }

    public  ShardStrategyFactory(final Configuration configuration, final LogicalDatastoreType logicalStoreType);

}