Package dev.avelar.mapnik
Class MapPool.Builder
java.lang.Object
dev.avelar.mapnik.MapPool.Builder
- Enclosing class:
- MapPool
Builds a pool; see
MapPool.builder(int, int, int).-
Method Summary
Modifier and TypeMethodDescriptionbuild()The longestMapPool.borrow()andMapPool.withMap(java.util.function.Function<dev.avelar.mapnik.MapnikMap, T>)wait for a free map before they throwMapPool.ExhaustedException.Run on each map when the pool is created, typically to load the style.Run on each map after setup, to make the first real request as fast as the rest: draw once, so that fonts, symbols and datasources are loaded and cached.
-
Method Details
-
setup
Run on each map when the pool is created, typically to load the style. -
warmup
Run on each map after setup, to make the first real request as fast as the rest: draw once, so that fonts, symbols and datasources are loaded and cached. If it throws, the pool is not created. -
maxWait
The longestMapPool.borrow()andMapPool.withMap(java.util.function.Function<dev.avelar.mapnik.MapnikMap, T>)wait for a free map before they throwMapPool.ExhaustedException. Without it they wait as long as it takes, which under overload stacks up requests; a limit lets a server answer "busy" instead. -
build
-