use of org.neo4j.kernel.ha.id.HaIdGeneratorFactory in project neo4j by neo4j.
the class HighlyAvailableEditionModule method createIdGeneratorFactory.
private IdGeneratorFactory createIdGeneratorFactory(DelegateInvocationHandler<Master> masterDelegateInvocationHandler, LogProvider logging, RequestContextFactory requestContextFactory, FileSystemAbstraction fs) {
idGeneratorFactory = new HaIdGeneratorFactory(masterDelegateInvocationHandler, logging, requestContextFactory, fs, idTypeConfigurationProvider);
/*
* We don't really switch to master here. We just need to initialize the idGenerator so the initial store
* can be started (if required). In any case, the rest of the database is in pending state, so nothing will
* happen until events start arriving and that will set us to the proper state anyway.
*/
((HaIdGeneratorFactory) idGeneratorFactory).switchToMaster();
return idGeneratorFactory;
}
Aggregations