private IndexInfos createIndexInfos ( Boolean system , IndexerIoModeHandler modeHandler , QueryHandlerEntry config , QueryHandler handler ) throws RepositoryConfigurationException { try { // read RSYNC configuration RSyncConfiguration rSyncConfiguration = new RSyncConfiguration ( config ) ; // rsync configured if ( rSyncConfiguration . getRsyncEntryName ( ) != null ) { return new RsyncIndexInfos ( wsId , cache , system , modeHandler , handler . getContext ( ) . getIndexDirectory ( ) , rSyncConfiguration ) ; } else { return new ISPNIndexInfos ( wsId , cache , true , modeHandler ) ; } } catch ( RepositoryConfigurationException e ) { return new ISPNIndexInfos ( wsId , cache , true , modeHandler ) ; } }
Factory method for creating corresponding IndexInfos class . RSyncIndexInfos created if RSync configured and ISPNIndexInfos otherwise