use of org.polymap.core.data.feature.GetFeaturesSizeResponse in project polymap4-core by Polymap4.
the class PipelineFeatureSource method getCountInternal.
@Override
@SuppressWarnings("hiding")
protected int getCountInternal(Query query) throws IOException {
GetFeaturesSizeRequest request = new GetFeaturesSizeRequest(query);
try {
final int[] result = new int[1];
newExecutor().execute(pipeline, request, (ProcessorResponse r) -> {
GetFeaturesSizeResponse response = (GetFeaturesSizeResponse) r;
result[0] = response.getSize();
});
return result[0];
} catch (Exception e) {
Throwables.propagateIfInstanceOf(e, IOException.class);
throw Throwables.propagate(e);
}
}
Aggregations