use of org.neo4j.internal.id.DefaultIdGeneratorFactory in project neo4j by neo4j.
the class ShortStringPropertyEncodeTest method setupStore.
@BeforeEach
void setupStore() {
neoStores = new StoreFactory(databaseLayout, Config.defaults(), new DefaultIdGeneratorFactory(fileSystem, immediate(), databaseLayout.getDatabaseName()), pageCache, fileSystem, NullLogProvider.getInstance(), NULL, writable()).openNeoStores(true, StoreType.PROPERTY, StoreType.PROPERTY_ARRAY, StoreType.PROPERTY_STRING);
propertyStore = neoStores.getPropertyStore();
}
use of org.neo4j.internal.id.DefaultIdGeneratorFactory in project neo4j by neo4j.
the class RelationshipGroupGetterTest method openStore.
@BeforeEach
void openStore() {
LogProvider logProvider = NullLogProvider.getInstance();
StoreFactory storeFactory = new StoreFactory(databaseLayout, Config.defaults(), new DefaultIdGeneratorFactory(fs, immediate(), databaseLayout.getDatabaseName()), pageCache, fs, logProvider, PageCacheTracer.NULL, writable());
stores = storeFactory.openNeoStores(true, StoreType.RELATIONSHIP_GROUP, StoreType.NODE, StoreType.NODE_LABEL);
groupStore = spy(stores.getRelationshipGroupStore());
NodeStore nodeStore = stores.getNodeStore();
groupRecords = new DirectRecordAccess<>(groupStore, Loaders.relationshipGroupLoader(groupStore, NULL));
nodeRecords = new DirectRecordAccess<>(nodeStore, Loaders.nodeLoader(nodeStore, NULL));
groupGetter = new RelationshipGroupGetter(groupStore, NULL);
}
use of org.neo4j.internal.id.DefaultIdGeneratorFactory in project neo4j by neo4j.
the class OnlineIndexUpdatesTest method setUp.
@BeforeEach
void setUp() throws IOException {
life = new LifeSupport();
Config config = Config.defaults();
NullLogProvider nullLogProvider = NullLogProvider.getInstance();
StoreFactory storeFactory = new StoreFactory(databaseLayout, config, new DefaultIdGeneratorFactory(fileSystem, immediate(), databaseLayout.getDatabaseName()), pageCache, fileSystem, nullLogProvider, NULL, writable());
neoStores = storeFactory.openAllNeoStores(true);
GBPTreeCountsStore counts = new GBPTreeCountsStore(pageCache, databaseLayout.countStore(), fileSystem, immediate(), new CountsComputer(neoStores, pageCache, NULL, databaseLayout, INSTANCE, NullLog.getInstance()), writable(), NULL, GBPTreeCountsStore.NO_MONITOR, databaseLayout.getDatabaseName(), 1_000);
life.add(wrapInLifecycle(counts));
nodeStore = neoStores.getNodeStore();
relationshipStore = neoStores.getRelationshipStore();
PropertyStore propertyStore = neoStores.getPropertyStore();
schemaCache = new SchemaCache(new StandardConstraintRuleAccessor(), index -> index);
propertyPhysicalToLogicalConverter = new PropertyPhysicalToLogicalConverter(neoStores.getPropertyStore(), CursorContext.NULL);
life.start();
propertyCreator = new PropertyCreator(neoStores.getPropertyStore(), new PropertyTraverser(CursorContext.NULL), CursorContext.NULL, INSTANCE);
recordAccess = new DirectRecordAccess<>(neoStores.getPropertyStore(), Loaders.propertyLoader(propertyStore, CursorContext.NULL));
}
use of org.neo4j.internal.id.DefaultIdGeneratorFactory in project neo4j by neo4j.
the class PropertyCreatorTest method startStore.
@BeforeEach
void startStore() {
neoStores = new StoreFactory(databaseLayout, Config.defaults(), new DefaultIdGeneratorFactory(fileSystem, immediate(), databaseLayout.getDatabaseName()), pageCache, fileSystem, NullLogProvider.getInstance(), PageCacheTracer.NULL, writable()).openNeoStores(true, StoreType.PROPERTY, StoreType.PROPERTY_STRING, StoreType.PROPERTY_ARRAY);
propertyStore = neoStores.getPropertyStore();
records = new DirectRecordAccess<>(propertyStore, Loaders.propertyLoader(propertyStore, NULL));
var pageCacheTracer = new DefaultPageCacheTracer();
cursorContext = new CursorContext(pageCacheTracer.createPageCursorTracer("propertyStore"));
creator = new PropertyCreator(propertyStore, new PropertyTraverser(NULL), cursorContext, INSTANCE);
}
use of org.neo4j.internal.id.DefaultIdGeneratorFactory in project neo4j by neo4j.
the class PropertyDeleterTest method startStore.
private void startStore(boolean log) {
Config config = Config.defaults(GraphDatabaseInternalSettings.log_inconsistent_data_deletion, log);
idGeneratorFactory = new DefaultIdGeneratorFactory(directory.getFileSystem(), immediate(), "db");
neoStores = new StoreFactory(DatabaseLayout.ofFlat(directory.homePath()), config, idGeneratorFactory, pageCache, directory.getFileSystem(), NullLogProvider.getInstance(), PageCacheTracer.NULL, writable()).openAllNeoStores(true);
propertyStore = neoStores.getPropertyStore();
propertyCreator = new PropertyCreator(propertyStore, traverser, NULL, INSTANCE);
deleter = new PropertyDeleter(traverser, this.neoStores, new TokenNameLookup() {
@Override
public String labelGetName(int labelId) {
return "" + labelId;
}
@Override
public String relationshipTypeGetName(int relationshipTypeId) {
return "" + relationshipTypeId;
}
@Override
public String propertyKeyGetName(int propertyKeyId) {
return "" + propertyKeyId;
}
}, logProvider, config, NULL, INSTANCE);
}
Aggregations