Package org.zanata.action

Examples of org.zanata.action.ReindexClassOptions


            Map<Class<?>, ReindexClassOptions> indexingOptions,
            AsyncTaskHandle handle) {
        // set up progress counter
        int totalOperations = 0;
        for (Class<?> clazz : indexingOptions.keySet()) {
            ReindexClassOptions opts = indexingOptions.get(clazz);
            if (opts.isPurge()) {
                totalOperations++;
            }

            if (opts.isReindex()) {
                totalOperations +=
                        getIndexer(clazz, handle).getEntityCount(session);
            }

            if (opts.isOptimize()) {
                totalOperations++;
            }
        }
        return totalOperations;
    }
View Full Code Here


        // NB we put the largest tables at the bottom, so that the small
        // tables can be indexed early
        indexables.add(HTextFlowTarget.class);

        for (Class<?> clazz : indexables) {
            indexingOptions.put(clazz, new ReindexClassOptions(clazz));
        }
    }
View Full Code Here

     * @param optimize
     *            Indicates whether to optimize the indexes.
     */
    public void setOptions(boolean purge, boolean reindex, boolean optimize) {
        for (Class<?> c : indexables) {
            ReindexClassOptions classOptions;
            if (indexingOptions.containsKey(c)) {
                classOptions = indexingOptions.get(c);
            } else {
                classOptions = new ReindexClassOptions(c);
                indexingOptions.put(c, classOptions);
            }

            classOptions.setPurge(purge);
            classOptions.setReindex(reindex);
            classOptions.setOptimize(optimize);
        }
    }
View Full Code Here

TOP

Related Classes of org.zanata.action.ReindexClassOptions

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.