Package org.locationtech.geogig.storage.BulkOpListener

Examples of org.locationtech.geogig.storage.BulkOpListener.CountingListener


                            return revFeature;
                        }

                    });

            CountingListener countingListener = BulkOpListener.newCountingListener();
            try {
                indexDatabase.putAll(objects, BulkOpListener.composite(listener, countingListener));
            } finally {
                features.close();
            }
            return countingListener.inserted();
        }
View Full Code Here


    private void copy(Set<ObjectId> ids, ObjectDatabase from, ObjectDatabase to,
            ProgressListener progress) {
        if (ids.isEmpty()) {
            return;
        }
        CountingListener countingListener = BulkOpListener.newCountingListener();
        to.putAll(from.getAll(ids), countingListener);
        int inserted = countingListener.inserted();
        progress.setProgress(progress.getProgress() + inserted);
    }
View Full Code Here

        PacketReadingIterator readingIterator = new PacketReadingIterator(in);

        Iterator<RevObject> asObjects = asObjects(readingIterator, callback);

        ObjectDatabase objectDatabase = repository.objectDatabase();
        CountingListener listener = BulkOpListener.newCountingListener();
        objectDatabase.putAll(asObjects, listener);
        LOGGER.info("Ingested %,d objects. Inserted: %,d. Already existing: %,d\n",
                listener.inserted() + listener.found(), listener.inserted(), listener.found());
        this.filtered = readingIterator.isFiltered();
    }
View Full Code Here

                    }
                });
            }
        };

        CountingListener countingListener = BulkOpListener.newCountingListener();
        listener = BulkOpListener.composite(countingListener, listener);
        database.putAll(objects, listener);
        return new IngestResults(countingListener.inserted(), countingListener.found());
    }
View Full Code Here

TOP

Related Classes of org.locationtech.geogig.storage.BulkOpListener.CountingListener

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.