public abstract class Request<V>
extends com.google.common.util.concurrent.AbstractFuture<V>
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
key |
| Modifier | Constructor and Description |
|---|---|
protected |
Request(byte[] key) |
protected |
Request(String key,
Charset charset) |
| Modifier and Type | Method and Description |
|---|---|
protected static byte[] |
encodeKey(String key,
Charset charset) |
protected static List<byte[]> |
encodeKeys(List<String> keys,
Charset charset) |
void |
fail(Throwable e) |
byte[] |
getKey() |
abstract void |
handle(Object response) |
void |
succeed(V result) |
protected static io.netty.buffer.ByteBuf |
toBuffer(io.netty.buffer.ByteBufAllocator alloc,
ByteBuffer dst) |
protected static io.netty.buffer.ByteBuf |
toBuffer(io.netty.buffer.ByteBufAllocator alloc,
ByteBuffer dst,
int extra) |
abstract io.netty.buffer.ByteBuf |
writeRequest(io.netty.buffer.ByteBufAllocator alloc,
ByteBuffer dst) |
protected static io.netty.buffer.ByteBuf toBuffer(io.netty.buffer.ByteBufAllocator alloc,
ByteBuffer dst)
public byte[] getKey()
public abstract io.netty.buffer.ByteBuf writeRequest(io.netty.buffer.ByteBufAllocator alloc,
ByteBuffer dst)
public void fail(Throwable e)
public void succeed(V result)
protected static io.netty.buffer.ByteBuf toBuffer(io.netty.buffer.ByteBufAllocator alloc,
ByteBuffer dst,
int extra)
public abstract void handle(Object response) throws IOException
IOExceptionCopyright © 2017 Spotify AB. All Rights Reserved.