Package org.locationtech.geogig.api.plumbing.diff

Examples of org.locationtech.geogig.api.plumbing.diff.PreOrderDiffWalk$Consumer


        RevTree left = resolveTree(leftRefSpec);
        RevTree right = resolveTree(rightRefSpec);

        ObjectDatabase leftSource = resolveSafeDb(leftRefSpec);
        ObjectDatabase rightSource = resolveSafeDb(rightRefSpec);
        PreOrderDiffWalk visitor = new PreOrderDiffWalk(left, right, leftSource, rightSource);
        CoordinateReferenceSystem crs = resolveCrs();
        BoundsWalk walk = new BoundsWalk(crs, stagingDatabase());
        PreOrderDiffWalk.Consumer consumer = walk;
        if (!pathFilters.isEmpty()) {
            consumer = new PathFilteringDiffConsumer(pathFilters, walk);
        }
        visitor.walk(consumer);
        DiffSummary<BoundingBox, BoundingBox> diffBounds = walk.getResult();
        return diffBounds;
    }
View Full Code Here


        final RevTree oldTree = getTree(oldRefSpec);
        final RevTree newTree = getTree(newRefSpec);

        DiffObjectCount diffCount;
        StagingDatabase index = stagingDatabase();
        PreOrderDiffWalk visitor = new PreOrderDiffWalk(oldTree, newTree, index, index);

        DiffCountConsumer counter = new DiffCountConsumer(index);
        PreOrderDiffWalk.Consumer filter = counter;
        if (!pathFilters.isEmpty()) {
            filter = new PathFilteringDiffConsumer(pathFilters, counter);
        }
        visitor.walk(filter);
        diffCount = counter.get();

        return diffCount;
    }
View Full Code Here

            return Iterators.emptyIterator();
        }

        ObjectDatabase leftSource = resolveSource(oldTree.getId());
        ObjectDatabase rightSource = resolveSource(newTree.getId());
        final PreOrderDiffWalk visitor = new PreOrderDiffWalk(oldTree, newTree, leftSource,
                rightSource);

        final BlockingQueue<DiffEntry> queue = new ArrayBlockingQueue<>(100);
        final DiffEntryProducer diffProducer = new DiffEntryProducer(queue);
        diffProducer.setReportTrees(this.reportTrees);
        diffProducer.setRecursive(this.recursive);

        final List<RuntimeException> producerErrors = new LinkedList<>();

        Thread producerThread = new Thread("DiffTree producer thread") {
            @Override
            public void run() {
                Consumer consumer = diffProducer;
                if (customFilter != null) {// evaluated the latest
                    consumer = new PreOrderDiffWalk.FilteringConsumer(consumer, customFilter);
                }
                if (changeTypeFilter != null) {
                    consumer = new ChangeTypeFilteringDiffConsumer(changeTypeFilter, consumer);
                }
                if (boundsFilter != null) {
                    consumer = new BoundsFilteringDiffConsumer(boundsFilter, consumer,
                            stagingDatabase());
                }
                if (!pathFilters.isEmpty()) {// evaluated the former
                    consumer = new PathFilteringDiffConsumer(pathFilters, consumer);
                }
                try {
                    visitor.walk(consumer);
                } catch (RuntimeException e) {
                    LOGGER.error("Error traversing diffs", e);
                    producerErrors.add(e);
                } finally {
                    diffProducer.finished = true;
View Full Code Here

TOP

Related Classes of org.locationtech.geogig.api.plumbing.diff.PreOrderDiffWalk$Consumer

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.