Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
agrgr committed Oct 8, 2023
1 parent 554581a commit e0c08c0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,16 @@ public <T> void deleteAll(ReactiveAerospikeRepository<T, ?> repository, Collecti
// KEY_NOT_FOUND ResultCode causes exception if there are no entities
}
} else {
entities.forEach(repository::delete);
entities.forEach(entity -> repository.delete(entity).block());
}
}

public <T> void saveAll(ReactiveAerospikeRepository<T, ?> repository, Collection<T> entities) {
// batch write operations are supported starting with Server version 6.0+
if (ServerVersionUtils.isBatchWriteSupported(template.getAerospikeReactorClient().getAerospikeClient())) {
repository.saveAll(entities);
repository.saveAll(entities).blockLast();
} else {
entities.forEach(repository::save);
entities.forEach(entity -> repository.save(entity).block());
}
}
}

0 comments on commit e0c08c0

Please sign in to comment.