Search in sources :

Example 1 with IdAllocationState

use of org.neo4j.causalclustering.core.state.machines.id.IdAllocationState in project neo4j by neo4j.

the class CoreBootstrapper method deriveIdAllocationState.

private IdAllocationState deriveIdAllocationState(File dbDir) throws IOException {
    DefaultIdGeneratorFactory factory = new DefaultIdGeneratorFactory(fs);
    long[] highIds = new long[] { getHighId(dbDir, factory, NODE, NODE_STORE_NAME), getHighId(dbDir, factory, RELATIONSHIP, RELATIONSHIP_STORE_NAME), getHighId(dbDir, factory, PROPERTY, PROPERTY_STORE_NAME), getHighId(dbDir, factory, STRING_BLOCK, PROPERTY_STRINGS_STORE_NAME), getHighId(dbDir, factory, ARRAY_BLOCK, PROPERTY_ARRAYS_STORE_NAME), getHighId(dbDir, factory, PROPERTY_KEY_TOKEN, PROPERTY_KEY_TOKEN_STORE_NAME), getHighId(dbDir, factory, PROPERTY_KEY_TOKEN_NAME, PROPERTY_KEY_TOKEN_NAMES_STORE_NAME), getHighId(dbDir, factory, RELATIONSHIP_TYPE_TOKEN, RELATIONSHIP_TYPE_TOKEN_STORE_NAME), getHighId(dbDir, factory, RELATIONSHIP_TYPE_TOKEN_NAME, RELATIONSHIP_TYPE_TOKEN_NAMES_STORE_NAME), getHighId(dbDir, factory, LABEL_TOKEN, LABEL_TOKEN_STORE_NAME), getHighId(dbDir, factory, LABEL_TOKEN_NAME, LABEL_TOKEN_NAMES_STORE_NAME), getHighId(dbDir, factory, NEOSTORE_BLOCK, ""), getHighId(dbDir, factory, SCHEMA, SCHEMA_STORE_NAME), getHighId(dbDir, factory, NODE_LABELS, NODE_LABELS_STORE_NAME), getHighId(dbDir, factory, RELATIONSHIP_GROUP, RELATIONSHIP_GROUP_STORE_NAME) };
    return new IdAllocationState(highIds, FIRST_INDEX);
}
Also used : IdAllocationState(org.neo4j.causalclustering.core.state.machines.id.IdAllocationState) DefaultIdGeneratorFactory(org.neo4j.kernel.impl.store.id.DefaultIdGeneratorFactory)

Aggregations

IdAllocationState (org.neo4j.causalclustering.core.state.machines.id.IdAllocationState)1 DefaultIdGeneratorFactory (org.neo4j.kernel.impl.store.id.DefaultIdGeneratorFactory)1