@SuppressWarnings("ReturnOfCollectionOrArrayField") @Override protected final PVector<T> computeNext() { if (nextPageURI == null) { return endOfData(); } TypedResponseWithEntity<List<T>> response = EvrythngApiBuilder.get(apiKey, nextPageURI, responseStatus, pageType) .executeWithResponse(); nextPageURI = nextPageURI(response); return response.entity() != null ? TreePVector.from(response.entity()) : TreePVector.<T>empty(); }
@Override @SuppressWarnings(value = {"unchecked"}) public void accept(SRC key, V value) { PVector<V> newv = buffer.swap((old) -> old.plus(value)); if (emit.test(newv)) { PVector<V> downstreamValue = buffer.swapReturnOld((old) -> TreePVector.empty()); firehose.notify(destination, downstreamValue); } }