Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Class/InterfaceMethod
Serializer
default ByteBuffer serializeToByteBuffer(String topic, T data) {
return wrapNullable(serialize(topic, data));
}

default ByteBuffer serializeToByteBuffer(String topic, Headers headers, T data) {
return wrapNullable(serialize(topic, headers, data));
}
ByteBufferSerializer
@Override
public ByteBuffer serializeToByteBuffer(String topic, ByteBuffer data)
{    // Consider that ByteBuffer#wrap(byte[]) return a ByteBuffer that does not need to call flip().
if (data.position() > 0) {
data.flip();
}
return data;
}

@Override
public ByteBuffer serializeToByteBuffer(String topic, Headers headers, ByteBuffer data) {
return serializeToByteBuffer(topic, data);
}
Partitioner
default int partition(String topic, Object key, ByteBuffer keyBytes, Object value, ByteBuffer valueBytes, Cluster cluster) {
return partition(topic, key, toNullableArray(keyBytes), value, toNullableArray(valueBytes), cluster);
}

...