You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Groups the items emitted by a {@code Publisher} according to a specified criterion, and emits these
9716
+
* grouped items as {@link GroupedFlowable}s. The emitted {@code GroupedFlowable} allows only a single
9717
+
* {@link Subscriber} during its lifetime and if this {@code Subscriber} cancels before the
9718
+
* source terminates, the next emission by the source having the same key will trigger a new
9719
+
* {@code GroupedPublisher} emission. The {@code evictingMapFactory} is used to create a map that will
9720
+
* be used to hold the {@link GroupedFlowable}s by key. The evicting map created by this factory must
9721
+
* notify the provided {@code Consumer<Object>} with the entry value (not the key!) when an entry in this
9722
+
* map has been evicted. The next source emission will bring about the completion of the evicted
9723
+
* {@link GroupedFlowable}s and the arrival of an item with the same key as a completed {@link GroupedFlowable}
9724
+
* will prompt the creation and emission of a new {@link GroupedFlowable} with that key.
9725
+
*
9726
+
* <p>A use case for specifying an {@code evictingMapFactory} is where the source is infinite and fast and
9727
+
* over time the number of keys grows enough to be a concern in terms of the memory footprint of the
9728
+
* internal hash map containing the {@link GroupedFlowable}s.
9729
+
*
9730
+
* <p>The map created by an {@code evictingMapFactory} must be thread-safe.
9731
+
*
9732
+
* <p>An example of an {@code evictingMapFactory} using <a href="https://google.github.io/guava/releases/24.0-jre/api/docs/com/google/common/cache/CacheBuilder.html">CacheBuilder</a> from the Guava library is below:
0 commit comments