kopia lustrzana https://github.com/onthegomap/planetiler
fix CloseableConsumer class name (#454)
rodzic
4ea87224af
commit
b97d9d0e79
|
@ -554,7 +554,7 @@ public class VectorTile {
|
|||
}
|
||||
|
||||
/**
|
||||
* A vector tile encoded as a list of commands according to the
|
||||
* A vector geometry encoded as a list of commands according to the
|
||||
* <a href="https://github.com/mapbox/vector-tile-spec/tree/master/2.1#43-geometry-encoding">vector tile
|
||||
* specification</a>.
|
||||
* <p>
|
||||
|
|
|
@ -9,7 +9,7 @@ import com.onthegomap.planetiler.stats.Stats;
|
|||
import com.onthegomap.planetiler.stats.Timer;
|
||||
import com.onthegomap.planetiler.util.BinPack;
|
||||
import com.onthegomap.planetiler.util.ByteBufferUtil;
|
||||
import com.onthegomap.planetiler.util.CloseableConusmer;
|
||||
import com.onthegomap.planetiler.util.CloseableConsumer;
|
||||
import com.onthegomap.planetiler.util.FileUtils;
|
||||
import com.onthegomap.planetiler.worker.WorkerPipeline;
|
||||
import java.io.BufferedInputStream;
|
||||
|
@ -138,7 +138,7 @@ class ExternalMergeSort implements FeatureSort {
|
|||
}
|
||||
|
||||
@Override
|
||||
public CloseableConusmer<SortableFeature> writerForThread() {
|
||||
public CloseableConsumer<SortableFeature> writerForThread() {
|
||||
return new ThreadLocalWriter();
|
||||
}
|
||||
|
||||
|
@ -396,7 +396,7 @@ class ExternalMergeSort implements FeatureSort {
|
|||
|
||||
/** Writer that a single thread can use to write features independent of writers used in other threads. */
|
||||
@NotThreadSafe
|
||||
private class ThreadLocalWriter implements CloseableConusmer<SortableFeature> {
|
||||
private class ThreadLocalWriter implements CloseableConsumer<SortableFeature> {
|
||||
|
||||
private Chunk currentChunk;
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import com.onthegomap.planetiler.geo.GeometryType;
|
|||
import com.onthegomap.planetiler.geo.TileCoord;
|
||||
import com.onthegomap.planetiler.render.RenderedFeature;
|
||||
import com.onthegomap.planetiler.stats.Stats;
|
||||
import com.onthegomap.planetiler.util.CloseableConusmer;
|
||||
import com.onthegomap.planetiler.util.CloseableConsumer;
|
||||
import com.onthegomap.planetiler.util.CommonStringEncoder;
|
||||
import com.onthegomap.planetiler.util.DiskBacked;
|
||||
import com.onthegomap.planetiler.util.LayerStats;
|
||||
|
@ -243,7 +243,7 @@ public final class FeatureGroup implements Iterable<FeatureGroup.TileFeatures>,
|
|||
}
|
||||
|
||||
/** Returns a new feature writer that can be used for a single thread. */
|
||||
public CloseableConusmer<SortableFeature> writerForThread() {
|
||||
public CloseableConsumer<SortableFeature> writerForThread() {
|
||||
return sorter.writerForThread();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package com.onthegomap.planetiler.collection;
|
||||
|
||||
import com.onthegomap.planetiler.stats.Stats;
|
||||
import com.onthegomap.planetiler.util.CloseableConusmer;
|
||||
import com.onthegomap.planetiler.util.CloseableConsumer;
|
||||
import com.onthegomap.planetiler.util.DiskBacked;
|
||||
import com.onthegomap.planetiler.util.MemoryEstimator;
|
||||
import com.onthegomap.planetiler.worker.WeightedHandoffQueue;
|
||||
|
@ -45,7 +45,7 @@ interface FeatureSort extends Iterable<SortableFeature>, DiskBacked, MemoryEstim
|
|||
}
|
||||
|
||||
@Override
|
||||
public CloseableConusmer<SortableFeature> writerForThread() {
|
||||
public CloseableConsumer<SortableFeature> writerForThread() {
|
||||
return list::add;
|
||||
}
|
||||
|
||||
|
@ -94,7 +94,7 @@ interface FeatureSort extends Iterable<SortableFeature>, DiskBacked, MemoryEstim
|
|||
* Returns a new writer that can be used to write features from a single thread independent of writers used from other
|
||||
* threads.
|
||||
*/
|
||||
CloseableConusmer<SortableFeature> writerForThread();
|
||||
CloseableConsumer<SortableFeature> writerForThread();
|
||||
|
||||
@Override
|
||||
default Iterator<SortableFeature> iterator() {
|
||||
|
|
|
@ -5,7 +5,7 @@ import java.io.IOException;
|
|||
import java.util.function.Consumer;
|
||||
|
||||
@FunctionalInterface
|
||||
public interface CloseableConusmer<T> extends Consumer<T>, Closeable {
|
||||
public interface CloseableConsumer<T> extends Consumer<T>, Closeable {
|
||||
|
||||
@Override
|
||||
default void close() throws IOException {}
|
|
@ -14,7 +14,7 @@ import com.onthegomap.planetiler.geo.GeometryType;
|
|||
import com.onthegomap.planetiler.geo.TileCoord;
|
||||
import com.onthegomap.planetiler.render.RenderedFeature;
|
||||
import com.onthegomap.planetiler.stats.Stats;
|
||||
import com.onthegomap.planetiler.util.CloseableConusmer;
|
||||
import com.onthegomap.planetiler.util.CloseableConsumer;
|
||||
import com.onthegomap.planetiler.util.Gzip;
|
||||
import com.onthegomap.planetiler.writer.TileArchiveWriter;
|
||||
import java.io.IOException;
|
||||
|
@ -40,7 +40,7 @@ class FeatureGroupTest {
|
|||
|
||||
private final FeatureSort sorter = FeatureSort.newInMemory();
|
||||
private FeatureGroup features = new FeatureGroup(sorter, new Profile.NullProfile(), Stats.inMemory());
|
||||
private CloseableConusmer<SortableFeature> featureWriter = features.writerForThread();
|
||||
private CloseableConsumer<SortableFeature> featureWriter = features.writerForThread();
|
||||
|
||||
@Test
|
||||
void testEmpty() {
|
||||
|
|
Ładowanie…
Reference in New Issue