public final class Utils extends Object
| Modifier and Type | Field and Description |
|---|---|
private static org.slf4j.Logger |
log |
static Executor |
SAME_THREAD_EXECUTOR
The Guava
MoreExecutors.sameThreadExecutor()
takes locks, so roll our own. |
| Modifier | Constructor and Description |
|---|---|
private |
Utils() |
| Modifier and Type | Method and Description |
|---|---|
static <T> com.google.common.base.Function<List<List<T>>,List<T>> |
flatten() |
static <I,O> com.google.common.util.concurrent.ListenableFuture<O> |
transform(com.google.common.util.concurrent.ListenableFuture<I> input,
com.google.common.util.concurrent.AsyncFunction<? super I,? extends O> function) |
static <I,O> com.google.common.util.concurrent.ListenableFuture<O> |
transform(com.google.common.util.concurrent.ListenableFuture<I> input,
com.google.common.base.Function<? super I,? extends O> function) |
static int |
ttlToExpiration(int ttl) |
private static final org.slf4j.Logger log
public static final Executor SAME_THREAD_EXECUTOR
MoreExecutors.sameThreadExecutor()
takes locks, so roll our own.public static <I,O> com.google.common.util.concurrent.ListenableFuture<O> transform(com.google.common.util.concurrent.ListenableFuture<I> input,
com.google.common.util.concurrent.AsyncFunction<? super I,? extends O> function)
public static <I,O> com.google.common.util.concurrent.ListenableFuture<O> transform(com.google.common.util.concurrent.ListenableFuture<I> input,
com.google.common.base.Function<? super I,? extends O> function)
public static int ttlToExpiration(int ttl)
Copyright © 2017 Spotify AB. All Rights Reserved.