}
@Override
public Long offer(@Nonnull T t) {
synchronized (monitor) {
Buffer buff = codec.encoder().apply(t);
int len = buff.remaining();
exAppender.startExcerpt(4 + len);
exAppender.writeInt(len);
exAppender.write(buff.byteBuffer());
exAppender.finish();
size.incrementAndGet();
lastId.set(exAppender.lastWrittenIndex());
}