class LuceneDataSource extends LifecycleAdapter {

    IndexReference getIndexSearcher( IndexIdentifier identifier ) throws ExplicitIndexNotFoundKernelException
    {
        assertNotClosed();
        IndexReference searcher = indexSearchers.get( identifier );
        if ( searcher == null )
        {
            return syncGetIndexSearcher( identifier );
        }
        synchronized ( searcher )
        {
            /*
             * We need to get again a reference to the searcher because it might be so that
             * it was refreshed while we waited. Once in here though no one will mess with
             * our searcher
             */
            searcher = indexSearchers.get( identifier );
            if ( searcher == null || searcher.isClosed() )
            {
                return syncGetIndexSearcher( identifier );
            }
            searcher = refreshSearcherIfNeeded( searcher );
            searcher.incRef();
            return searcher;
        }
    }

    public  LuceneDataSource( DatabaseLayout directoryStructure, Config config, IndexConfigStore indexStore,
            FileSystemAbstraction fileSystemAbstraction, OperationalMode operationalMode );

}