Skip to content

Instantly share code, notes, and snippets.

@heshamMassoud
Last active September 23, 2019 19:34
Show Gist options
  • Save heshamMassoud/f22a75b39f60d3ced61a2ae1fad8079b to your computer and use it in GitHub Desktop.
Save heshamMassoud/f22a75b39f60d3ced61a2ae1fad8079b to your computer and use it in GitHub Desktop.
ProductSyncExample.java
// execute the sync on your list of productDrafts
final CompletionStage<ProductSyncStatistics> syncStatisticsStage = productSync.sync(productDrafts);
final ProductSyncStatistics stats = syncStatisticsStage.toCompletebleFuture().join();
LOGGER.info(stats.getReportMessage());
/*Prints the following line: "Summary: 2000 products were processed in total (1000 created, 995 updated and 5 failed to sync)."*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment