class AttributeMetadata {

    public Stream<A> getDistinctKeys() {
        QueryOptions queryOptions = openResources();
        return asStream(queryOptions, index.getDistinctKeys(queryOptions));
    }

      AttributeMetadata(KeyStatisticsIndex<A, O> index, Supplier<QueryOptions> openResourcesHandler, Consumer<QueryOptions> closeResourcesHandler);

}