use of org.neo4j.kernel.impl.api.index.IndexMap in project neo4j by neo4j.
the class IndexSamplingController method sampleIndex.
public void sampleIndex(long indexId, IndexSamplingMode mode) {
IndexMap indexMap = indexMapSnapshotProvider.indexMapSnapshot();
jobQueue.add(!mode.sampleOnlyIfUpdated, indexId);
scheduleSampling(mode, indexMap);
}
use of org.neo4j.kernel.impl.api.index.IndexMap in project neo4j by neo4j.
the class IndexSamplingController method sampleIndexes.
public void sampleIndexes(IndexSamplingMode mode) {
IndexMap indexMap = indexMapSnapshotProvider.indexMapSnapshot();
jobQueue.addAll(!mode.sampleOnlyIfUpdated, indexMap.indexIds());
scheduleSampling(mode, indexMap);
}
use of org.neo4j.kernel.impl.api.index.IndexMap in project neo4j by neo4j.
the class IndexSamplingController method recoverIndexSamples.
public void recoverIndexSamples() {
samplingLock.lock();
try {
IndexMap indexMap = indexMapSnapshotProvider.indexMapSnapshot();
Iterator<Long> indexIds = indexMap.indexIds();
while (indexIds.hasNext()) {
long indexId = indexIds.next();
if (indexRecoveryCondition.test(indexId, indexMap.getIndexProxy(indexId).getDescriptor())) {
sampleIndexOnCurrentThread(indexMap, indexId);
}
}
} finally {
samplingLock.unlock();
}
}
Aggregations