public final class Utils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private static int |
TTL_CUTOFF |
| Modifier | Constructor and Description |
|---|---|
private |
Utils() |
| Modifier and Type | Method and Description |
|---|---|
static <T> java.util.function.Function<java.util.List<java.util.List<T>>,java.util.List<T>> |
flatten() |
static int |
getGlobalConnectionCount()
A counter of all currently connected clients.
|
(package private) static <T> java.util.concurrent.CompletionStage<T> |
onExecutor(java.util.concurrent.CompletionStage<T> future,
java.util.concurrent.Executor executor) |
static int |
ttlToExpiration(int ttl) |
static java.lang.Throwable |
unwrap(java.lang.Throwable e) |
static <K,V> java.util.Map<K,V> |
zipToMap(java.util.List<K> keys,
java.util.List<V> values)
Zip together a list of keys and a list of values to a map.
|
private static final int TTL_CUTOFF
public static int ttlToExpiration(int ttl)
public static <T> java.util.function.Function<java.util.List<java.util.List<T>>,java.util.List<T>> flatten()
public static int getGlobalConnectionCount()
public static java.lang.Throwable unwrap(java.lang.Throwable e)
static <T> java.util.concurrent.CompletionStage<T> onExecutor(java.util.concurrent.CompletionStage<T> future,
java.util.concurrent.Executor executor)
public static <K,V> java.util.Map<K,V> zipToMap(java.util.List<K> keys,
java.util.List<V> values)
K - the type of keysV - the type of valueskeys - the list of keysvalues - the list of valuesjava.lang.IllegalArgumentException - if the lists are note equal in length.Copyright © 2023 Spotify AB. All Rights Reserved.