Package org.exist.storage.statistics

Examples of org.exist.storage.statistics.IndexStatistics


    public GetIndexStatistics(XQueryContext context) {
        super(context, signature);
    }

    public Sequence eval(Sequence[] args, Sequence contextSequence) throws XPathException {
        final IndexStatistics index = (IndexStatistics) context.getBroker().getBrokerPool().
                getIndexManager().getIndexById(IndexStatistics.ID);
        if (index == null) {
            // module may not be enabled
            return Sequence.EMPTY_SEQUENCE;
        }

        final SAXAdapter adapter = new SAXAdapter(context);
        try {
            adapter.startDocument();
            index.toSAX(adapter);
            adapter.endDocument();
        } catch (final SAXException e) {
            throw new XPathException(this, "Error caught while retrieving statistics: " + e.getMessage(), e);
        }
        final DocumentImpl doc = (DocumentImpl) adapter.getDocument();
View Full Code Here

TOP

Related Classes of org.exist.storage.statistics.IndexStatistics

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.