use of com.generallycloud.baseio.codec.redis.future.RedisFuture in project baseio by generallycloud.
the class RedisProtocolEncoder method encode.
@Override
public void encode(SocketChannel channel, ChannelFuture future) throws IOException {
RedisFuture f = (RedisFuture) future;
int writeSize = f.getWriteSize();
if (writeSize == 0) {
throw new IOException("null write buffer");
}
ByteBuf buf = UnpooledByteBufAllocator.getHeap().wrap(f.getWriteBuffer(), 0, writeSize);
future.setByteBuf(buf);
}
Aggregations