use of io.pravega.shared.protocol.netty.WireCommands.Padding in project pravega by pravega.
the class CommandEncoder method breakFromAppend.
private void breakFromAppend(ByteBuf out) {
if (bytesLeftInBlock != 0) {
writeMessage(new Padding(bytesLeftInBlock - TYPE_PLUS_LENGTH_SIZE), out);
Session session = setupSegments.get(segmentBeingAppendedTo);
writeMessage(new AppendBlockEnd(session.id, currentBlockSize - bytesLeftInBlock, null, session.eventCount, session.lastEventNumber, 0L), out);
bytesLeftInBlock = 0;
currentBlockSize = 0;
session.eventCount = 0;
}
segmentBeingAppendedTo = null;
}
Aggregations