Package org.apache.jackrabbit.oak.api.jmx

Examples of org.apache.jackrabbit.oak.api.jmx.IndexStatsMBean


            LOG.debug("Finished beforeIteration()");
        }
    }

    protected void waitBeforeIterationFinish(long loadFinish) {
        IndexStatsMBean indexStatsMBean = WhiteboardUtils.getService(whiteboard, IndexStatsMBean.class);

        if (indexStatsMBean != null) {
            String lastIndexedTime = indexStatsMBean.getLastIndexedTime();
            while (((lastIndexedTime == null)
                || ISO8601.parse(lastIndexedTime).getTimeInMillis() < loadFinish)) {
                try {
                    if (LOG.isDebugEnabled()) {
                        LOG.debug("Waiting for async indexing to finish");
                    }
                    Thread.sleep(5000);
                } catch (InterruptedException e) {
                    LOG.error("Error waiting for async index to finish", e);
                }
                lastIndexedTime = indexStatsMBean.getLastIndexedTime();
            }

            LOG.info("Execution Count {}", indexStatsMBean.getExecutionCount());
            LOG.info("Execution Time {}", indexStatsMBean.getExecutionTime());
            LOG.info("Consolidated Execution Stats {}", indexStatsMBean.getConsolidatedExecutionStats());
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.api.jmx.IndexStatsMBean

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.