public class IndexPostProcessor extends Object
Class responsible for merging duplicate Attributes which may result from creating
Attributes in a concurrent environment
| Modifier and Type | Method and Description |
|---|---|
static IndexPostProcessor |
create(LockProvider lockProvider,
IndexStorage redisIndexStorage) |
void |
mergeDuplicateConcepts(EmbeddedGraknTx<?> tx,
String conceptIndex,
Set<ai.grakn.concept.ConceptId> conceptIds)
Merges duplicate
Concepts based on the unique index provided plus the ConceptIds
of the suspected duplicates |
Set<ai.grakn.concept.ConceptId> |
popIds(ai.grakn.Keyspace keyspace,
String index) |
String |
popIndex(ai.grakn.Keyspace keyspace) |
void |
updateIndices(ai.grakn.kb.log.CommitLog commitLog)
|
public static IndexPostProcessor create(LockProvider lockProvider, IndexStorage redisIndexStorage)
public String popIndex(ai.grakn.Keyspace keyspace)
public void updateIndices(ai.grakn.kb.log.CommitLog commitLog)
Attributes of a CommitLog to IndexStorage for storage.
This data will be retrieved later and post processed.commitLog - The CommitLog which contains the new Attributes to post processpublic void mergeDuplicateConcepts(EmbeddedGraknTx<?> tx, String conceptIndex, Set<ai.grakn.concept.ConceptId> conceptIds)
Concepts based on the unique index provided plus the ConceptIds
of the suspected duplicatestx - The GraknTx responsible for performing the mergeconceptIndex - The unique Concept index which is supposed to exist only once
across the entire DB.conceptIds - The ConceptIds of the suspected duplicatesCopyright © 2018 Grakn Labs Ltd. All rights reserved.