Package org.opensolaris.opengrok.index

Examples of org.opensolaris.opengrok.index.Indexer


            if (cfgFile.exists()) {
                env = RuntimeEnvironment.getInstance();
                log.log(Level.INFO, "Running indexer with configuration {0}", configfile);
                env.readConfiguration(cfgFile);

                Indexer index = Indexer.getInstance();
                int noThreads = Management.getInstance().getNumberOfThreads().intValue();
                boolean update = Management.getInstance().getUpdateIndexDatabase().booleanValue();
                String[] sublist = Management.getInstance().getSubFiles();
                log.info("Update source repositories");
                HistoryGuru.getInstance().updateRepositories();
                List<String> subFiles = Arrays.asList(sublist);
                log.log(Level.INFO, "Starting index, update {0} noThreads {1} subfiles {2}", new Object[]{String.valueOf(update), String.valueOf(noThreads), String.valueOf(subFiles.size())});
                index.doIndexerExecution(update, noThreads, subFiles, this);
                log.info("Finished indexing");
                lastIndexFinish = System.currentTimeMillis();
                sendNotifications();
                doNotify(NOTIFICATIONINFOLONGTYPE, "FinishedIndexing", Long.valueOf(lastIndexFinish));
                lastIndexUsedTime = lastIndexFinish - lastIndexStart;
                String publishhost = Management.getInstance().getPublishServerURL();
                if ((publishhost == null) || (publishhost.equals(""))) {
                    log.warning("No publishhost given, not sending updates");
                } else {
                    index.sendToConfigHost(env, publishhost);
                    doNotify(NOTIFICATIONINFOSTRINGTYPE, "Published index", publishhost);
                }


            } else {
View Full Code Here

TOP

Related Classes of org.opensolaris.opengrok.index.Indexer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.