use of org.neo4j.causalclustering.core.consensus.membership.MembershipEntry in project neo4j by neo4j.
the class CoreBootstrapper method bootstrap.
public CoreSnapshot bootstrap(Set<MemberId> members) throws IOException {
StoreFactory factory = new StoreFactory(storeDir, config, new DefaultIdGeneratorFactory(fs), pageCache, fs, logProvider);
NeoStores neoStores = factory.openAllNeoStores(true);
neoStores.close();
CoreSnapshot coreSnapshot = new CoreSnapshot(FIRST_INDEX, FIRST_TERM);
coreSnapshot.add(CoreStateType.ID_ALLOCATION, deriveIdAllocationState(storeDir));
coreSnapshot.add(CoreStateType.LOCK_TOKEN, new ReplicatedLockTokenState());
coreSnapshot.add(CoreStateType.RAFT_CORE_STATE, new RaftCoreState(new MembershipEntry(FIRST_INDEX, members)));
coreSnapshot.add(CoreStateType.SESSION_TRACKER, new GlobalSessionTrackerState());
appendNullTransactionLogEntryToSetRaftIndexToMinusOne();
return coreSnapshot;
}
Aggregations