class LuceneDataSource extends LifecycleAdapter {

    void deleteIndex( IndexIdentifier identifier, boolean recovery ) throws IOException
    {
        if ( readOnly )
        {
            throw new IllegalStateException( "Index deletion in read only mode is not supported." );
        }
        closeIndex( identifier );
        FileUtils.deleteRecursively( getFileDirectory( baseStorePath, identifier ) );
        indexTypeMap.remove( identifier );
        boolean removeFromIndexStore =
                !recovery || (indexStore.has( identifier.entityType.entityClass(), identifier.indexName ));
        if ( removeFromIndexStore )
        {
            indexStore.remove( identifier.entityType.entityClass(), identifier.indexName );
        }
        typeCache.invalidate( identifier );
    }

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

}