use of org.apache.ignite.internal.schema.SchemaAware in project ignite-3 by apache.
the class ClientTableCommon method writeTuples.
/**
* Writes multiple tuples.
*
* @param packer Packer.
* @param tuples Tuples.
* @param part Which part of tuple to write.
* @param schemaRegistry The registry.
* @param skipHeader Whether to skip the tuple header.
* @throws IgniteException on failed serialization.
*/
public static void writeTuples(ClientMessagePacker packer, Collection<Tuple> tuples, TuplePart part, SchemaRegistry schemaRegistry, boolean skipHeader) {
if (tuples == null || tuples.isEmpty()) {
packer.packNil();
return;
}
SchemaDescriptor schema = schemaRegistry.schema();
packer.packInt(schema.version());
packer.packInt(tuples.size());
for (Tuple tuple : tuples) {
assert tuple != null;
assert schema.version() == ((SchemaAware) tuple).schema().version();
writeTuple(packer, tuple, schema, skipHeader, part);
}
}
Aggregations