class AttributeMetadata {

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

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

}