public class TransformerUtil<T> extends Object
| Modifier and Type | Class and Description |
|---|---|
private static class |
TransformerUtil.ListResultDecoder<T> |
private static class |
TransformerUtil.ListResultUnwrapper<T> |
private static class |
TransformerUtil.ResultDecoder<T> |
private static class |
TransformerUtil.ResultUnwrapper<T> |
| Modifier and Type | Field and Description |
|---|---|
private com.google.common.base.Function<GetResult<T>,T> |
getResultToValue |
private TransformerUtil.ListResultDecoder<T> |
listResultDecoder |
private TransformerUtil.ListResultUnwrapper<T> |
listResultUnwrapper |
private TransformerUtil.ResultDecoder<T> |
resultDecoder |
| Constructor and Description |
|---|
TransformerUtil(Transcoder<T> transcoder) |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.util.concurrent.ListenableFuture<GetResult<T>> |
decode(com.google.common.util.concurrent.ListenableFuture<GetResult<byte[]>> future) |
com.google.common.util.concurrent.ListenableFuture<List<GetResult<T>>> |
decodeList(com.google.common.util.concurrent.ListenableFuture<List<GetResult<byte[]>>> future) |
com.google.common.util.concurrent.ListenableFuture<T> |
unwrap(com.google.common.util.concurrent.ListenableFuture<GetResult<T>> future) |
com.google.common.util.concurrent.ListenableFuture<List<T>> |
unwrapList(com.google.common.util.concurrent.ListenableFuture<List<GetResult<T>>> future) |
private final TransformerUtil.ListResultUnwrapper<T> listResultUnwrapper
private final TransformerUtil.ResultDecoder<T> resultDecoder
private final TransformerUtil.ListResultDecoder<T> listResultDecoder
public TransformerUtil(Transcoder<T> transcoder)
public com.google.common.util.concurrent.ListenableFuture<T> unwrap(com.google.common.util.concurrent.ListenableFuture<GetResult<T>> future)
public com.google.common.util.concurrent.ListenableFuture<GetResult<T>> decode(com.google.common.util.concurrent.ListenableFuture<GetResult<byte[]>> future)
public com.google.common.util.concurrent.ListenableFuture<List<T>> unwrapList(com.google.common.util.concurrent.ListenableFuture<List<GetResult<T>>> future)
Copyright © 2017 Spotify AB. All rights reserved.