/** * Opens the {@link IdGenerator} used by this store. * <p> * Note: This method may be called both while the store has the store file mapped in the * page cache, and while the store file is not mapped. Implementers must therefore * map their own temporary PagedFile for the store file, and do their file IO through that, * if they need to access the data in the store file. */ void openIdGenerator() { idGenerator = idGeneratorFactory.open( idFile, getIdType(), this::scanForHighId, recordFormat.getMaxId() ); }
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 = store -> { highIds.put( store.getIdType(), store.getHighId() ); return true; }; neoStores.visitStore( visitor ); return highIds; }
IdValidator.assertValidId( getIdType(), id, recordFormat.getMaxId() );
/** * Opens the {@link IdGenerator} used by this store. * <p> * Note: This method may be called both while the store has the store file mapped in the * page cache, and while the store file is not mapped. Implementers must therefore * map their own temporary PagedFile for the store file, and do their file IO through that, * if they need to access the data in the store file. */ void openIdGenerator() { idGenerator = idGeneratorFactory.open( idFile, getIdType(), this::scanForHighId, recordFormat.getMaxId() ); }
IdValidator.assertValidId( getIdType(), id, recordFormat.getMaxId() );