mirror of https://github.com/grpc/grpc-java.git
netty: simplify SendGrpcFrameCommand
DefaultByteBufHolder has many perfectly good implementations. It should be enought to implement the replace method.
This commit is contained in:
parent
ae59afb5bf
commit
9148095df4
|
|
@ -55,37 +55,8 @@ final class SendGrpcFrameCommand extends DefaultByteBufHolder implements WriteQu
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ByteBufHolder copy() {
|
public ByteBufHolder replace(ByteBuf content) {
|
||||||
return new SendGrpcFrameCommand(stream, content().copy(), endStream);
|
return new SendGrpcFrameCommand(stream, content, endStream);
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ByteBufHolder duplicate() {
|
|
||||||
return new SendGrpcFrameCommand(stream, content().duplicate(), endStream);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SendGrpcFrameCommand retain() {
|
|
||||||
super.retain();
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SendGrpcFrameCommand retain(int increment) {
|
|
||||||
super.retain(increment);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SendGrpcFrameCommand touch() {
|
|
||||||
super.touch();
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SendGrpcFrameCommand touch(Object hint) {
|
|
||||||
super.touch(hint);
|
|
||||||
return this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue