class MetadataEngine {

    public <A> AttributeMetadata<A, O> getAttributeMetadata(Attribute<O, A> attribute) {
        @SuppressWarnings("unchecked")
        KeyStatisticsIndex<A, O> index = getIndexOnAttribute(KeyStatisticsAttributeIndex.class, attribute);
        return new AttributeMetadata<>(index, openResourcesHandler, closeResourcesHandler);
    }

    public  MetadataEngine(IndexedCollection<O> indexedCollection, Supplier<QueryOptions> openResourcesHandler, Consumer<QueryOptions> closeResourcesHandler);

}