Search in sources :

Example 1 with AbstractDelegatingIndexProxy

use of org.neo4j.kernel.impl.api.index.AbstractDelegatingIndexProxy 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);
    }
}
Also used : OnlineIndexProxy(org.neo4j.kernel.impl.api.index.OnlineIndexProxy) AbstractDelegatingIndexProxy(org.neo4j.kernel.impl.api.index.AbstractDelegatingIndexProxy) AbstractDelegatingIndexProxy(org.neo4j.kernel.impl.api.index.AbstractDelegatingIndexProxy) IndexProxy(org.neo4j.kernel.impl.api.index.IndexProxy) OnlineIndexProxy(org.neo4j.kernel.impl.api.index.OnlineIndexProxy) IndexNotFoundKernelException(org.neo4j.internal.kernel.api.exceptions.schema.IndexNotFoundKernelException)

Aggregations

IndexNotFoundKernelException (org.neo4j.internal.kernel.api.exceptions.schema.IndexNotFoundKernelException)1 AbstractDelegatingIndexProxy (org.neo4j.kernel.impl.api.index.AbstractDelegatingIndexProxy)1 IndexProxy (org.neo4j.kernel.impl.api.index.IndexProxy)1 OnlineIndexProxy (org.neo4j.kernel.impl.api.index.OnlineIndexProxy)1