Examples of CancellableQuery


Examples of org.modeshape.jcr.query.CancellableQuery

        RepositoryQueryManager queryManager = repository.queryManager();
        Set<String> workspaceNames = repoCache.getWorkspaceNames();
        Map<String, NodeCache> overridden = null;
        NodeTypes nodeTypes = repository.nodeTypeManager().getNodeTypes();
        RepositoryIndexes indexDefns = repository.queryManager().getIndexes();
        CancellableQuery query = queryManager.query(context, repoCache, workspaceNames, overridden, command, schemata,
                                                    indexDefns, nodeTypes, null, null);
        try {
            QueryResults result = query.execute();
            if (result.isEmpty()) return false;
            if (result.getRowCount() < 0) {
                // Try to get the first row ...
                NodeSequence seq = result.getRows();
                Batch batch = seq.nextBatch();
View Full Code Here

Examples of org.modeshape.jcr.query.CancellableQuery

        final QueryContext queryContext = queryEngine.createQueryContext(context, repositoryCache, workspaceNames,
                                                                         overriddenNodeCachesByWorkspaceName, schemata,
                                                                         indexDefns, nodeTypes, new BufferManager(context),
                                                                         hints, variables);
        final org.modeshape.jcr.query.model.QueryCommand command = (org.modeshape.jcr.query.model.QueryCommand)query;
        return new CancellableQuery() {
            private final Lock lock = new ReentrantLock();
            private QueryResults results;

            @Override
            public QueryResults execute() throws QueryCancelledException, RepositoryException {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.