Search in sources :

Example 1 with IndexMap

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);
}
Also used : IndexMap(org.neo4j.kernel.impl.api.index.IndexMap)

Example 2 with 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);
}
Also used : IndexMap(org.neo4j.kernel.impl.api.index.IndexMap)

Example 3 with 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();
    }
}
Also used : IndexMap(org.neo4j.kernel.impl.api.index.IndexMap)

Aggregations

IndexMap (org.neo4j.kernel.impl.api.index.IndexMap)3