com.github.fmjsjx.libnetty.resp.AbstractRespAggregateMessage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of libnetty-resp Show documentation
Show all versions of libnetty-resp Show documentation
A set of some useful libraries based on netty4.1.x.
package com.github.fmjsjx.libnetty.resp;
import static com.github.fmjsjx.libnetty.resp.RespConstants.EOL_LENGTH;
import static com.github.fmjsjx.libnetty.resp.RespConstants.EOL_SHORT;
import static com.github.fmjsjx.libnetty.resp.RespConstants.TYPE_LENGTH;
import java.util.List;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufAllocator;
import io.netty.util.AbstractReferenceCounted;
/**
* The abstract implementation of {@link RespAggregateMessage}.
*
* @param the type of values in this message
* @param the type of the real class
*
* @since 1.1
*
* @author MJ Fang
*/
@SuppressWarnings("unchecked")
public abstract class AbstractRespAggregateMessage>
extends AbstractReferenceCounted implements RespAggregateMessage {
@Override
public Self retain() {
super.retain();
return (Self) this;
}
@Override
public Self retain(int increment) {
super.retain(increment);
return (Self) this;
}
@Override
public Self touch() {
super.touch();
return (Self) this;
}
@Override
public abstract Self touch(Object hint);
@Override
public void encode(ByteBufAllocator alloc, List