Search in sources :

Example 1 with CommonAbstractStore

use of org.neo4j.kernel.impl.store.CommonAbstractStore in project neo4j by neo4j.

the class TestCrashWithRebuildSlow method getHighIds.

private static Map<IdType, Long> getHighIds(GraphDatabaseAPI db) {
    final Map<IdType, Long> highIds = new HashMap<>();
    NeoStores neoStores = db.getDependencyResolver().resolveDependency(RecordStorageEngine.class).testAccessNeoStores();
    Visitor<CommonAbstractStore, RuntimeException> visitor = new Visitor<CommonAbstractStore, RuntimeException>() {

        @Override
        public boolean visit(CommonAbstractStore store) throws RuntimeException {
            highIds.put(store.getIdType(), store.getHighId());
            return true;
        }
    };
    neoStores.visitStore(visitor);
    return highIds;
}
Also used : Visitor(org.neo4j.helpers.collection.Visitor) HashMap(java.util.HashMap) RecordStorageEngine(org.neo4j.kernel.impl.storageengine.impl.recordstorage.RecordStorageEngine) NeoStores(org.neo4j.kernel.impl.store.NeoStores) CommonAbstractStore(org.neo4j.kernel.impl.store.CommonAbstractStore) IdType(org.neo4j.kernel.impl.store.id.IdType)

Aggregations

HashMap (java.util.HashMap)1 Visitor (org.neo4j.helpers.collection.Visitor)1 RecordStorageEngine (org.neo4j.kernel.impl.storageengine.impl.recordstorage.RecordStorageEngine)1 CommonAbstractStore (org.neo4j.kernel.impl.store.CommonAbstractStore)1 NeoStores (org.neo4j.kernel.impl.store.NeoStores)1 IdType (org.neo4j.kernel.impl.store.id.IdType)1