DataExternalizer<List<IndexEntry>> () { return new DataExternalizer<>() { @Override public void save(@NotNull DataOutput out, List<IndexEntry> value) throws IOException { DataInputOutputUtilRt.writeSeq(out, value, entry -> entry.serialize(out)); } @Override public List<IndexEntry> read(@NotNull DataInput in) throws IOException { return DataInputOutputUtilRt.readSeq(in, () -> IndexEntry.deserialize(in)); } }; }