private void handleReadAllValues() throws IOException {
CloseableIterator<KeyValue> it = dataInterface.iterator();
try {
while (it.hasNext()) {
KeyValue next = it.next();
Object valueToWrite = next.getValue();
long key = next.getKey();
if (key == LONG_END || key == LONG_ERROR || key == LONG_OK) {
throw new RuntimeException("Unexpected key " + key + " in dataInterface " + dataInterface.getName());
}
connection.writeLong(key);
connection.writeValue(valueToWrite, dataInterface.getObjectClass());