use of org.neo4j.kernel.impl.api.index.OnlineIndexProxy in project neo4j by neo4j.
the class LookupAccessorsFromRunningDb method apply.
@Override
public IndexAccessor apply(IndexDescriptor indexDescriptor) {
try {
IndexProxy proxy = indexingService.getIndexProxy(indexDescriptor);
while (proxy instanceof AbstractDelegatingIndexProxy) {
proxy = ((AbstractDelegatingIndexProxy) proxy).getDelegate();
}
assertEquals(InternalIndexState.ONLINE, proxy.getState());
return ((OnlineIndexProxy) proxy).accessor();
} catch (IndexNotFoundKernelException e) {
throw new RuntimeException(e);
}
}
Aggregations