Skip to content

Instantly share code, notes, and snippets.

View pivovarit's full-sized avatar

Grzegorz Piwowarek pivovarit

View GitHub Profile
package com.pivovarit;
import java.util.Arrays;
import java.util.Objects;
/**
* Conveys a piece of data between one producer thread and arbitrarily many
* consumer threads. The producer may at any time call
* {@link #setSerialized(byte[])} to publish an object in serialized form.
* After that any consumer may call {@link #getDeserialized()} any number of
package com.pivovarit.demo;
import com.pivovarit.collectors.ParallelCollectors;
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.List;
package com.pivovarit.gatherers;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.concurrent.atomic.AtomicLong;