use of org.infinispan.remoting.transport.XSiteAsyncAckListener in project infinispan by infinispan.
the class JGroupsBackupResponse method notifyAsyncAck.
@Override
public void notifyAsyncAck(XSiteAsyncAckListener listener) {
XSiteAsyncAckListener nonNullListener = Objects.requireNonNull(listener);
for (Map.Entry<XSiteBackup, CompletableFuture<ValidResponse>> entry : backupCalls.entrySet()) {
XSiteBackup backup = entry.getKey();
if (backup.isSync()) {
continue;
}
// TODO whenCompleteAsync? currently not needed...
entry.getValue().whenComplete((response, throwable) -> nonNullListener.onAckReceived(sendTimeNanos, backup.getSiteName(), throwable));
}
}
Aggregations