/** {@inheritDoc} */ @Override public boolean onDone(@Nullable Boolean res, @Nullable Throwable err) { if (!isDone()) { pendingWrites.remove(fileId, this); if (super.onDone(res, err)) return true; } return false; }
/** {@inheritDoc} */ @Override public boolean onDone(@Nullable Boolean res, @Nullable Throwable err) { if (!isDone()) { pendingWrites.remove(fileId, this); if (super.onDone(res, err)) return true; } return false; }
/** * Write request will be asynchronously executed on node with given ID. * * @param nodeId Node ID. * @param batchId Assigned batch ID. */ private void onWriteRequest(UUID nodeId, long batchId) { if (!isDone()) { Set<Long> reqIds = pendingAcks.get(nodeId); if (reqIds == null) reqIds = F.addIfAbsent(pendingAcks, nodeId, new GridConcurrentHashSet<Long>()); reqIds.add(batchId); } }
if (completionFut.isDone()) completionFut.get();
if (completionFut.isDone()) completionFut.get();
/** * Write ack received from node with given ID for given batch ID. * * @param nodeId Node ID. * @param batchId Batch ID. */ private void onWriteAck(UUID nodeId, long batchId) { if (!isDone()) { Set<Long> reqIds = pendingAcks.get(nodeId); assert reqIds != null : "Received acknowledgement message for not registered node [nodeId=" + nodeId + ", batchId=" + batchId + ']'; boolean rmv = reqIds.remove(batchId); assert rmv : "Received acknowledgement message for not registered batch [nodeId=" + nodeId + ", batchId=" + batchId + ']'; if (awaitingLast && checkCompleted()) onDone(true); } }
/** * Write ack received from node with given ID for given batch ID. * * @param nodeId Node ID. * @param batchId Batch ID. */ private void onWriteAck(UUID nodeId, long batchId) { if (!isDone()) { Set<Long> reqIds = pendingAcks.get(nodeId); assert reqIds != null : "Received acknowledgement message for not registered node [nodeId=" + nodeId + ", batchId=" + batchId + ']'; boolean rmv = reqIds.remove(batchId); assert rmv : "Received acknowledgement message for not registered batch [nodeId=" + nodeId + ", batchId=" + batchId + ']'; if (awaitingLast && checkCompleted()) onDone(true); } }
/** * Write request will be asynchronously executed on node with given ID. * * @param nodeId Node ID. * @param batchId Assigned batch ID. */ private void onWriteRequest(UUID nodeId, long batchId) { if (!isDone()) { Set<Long> reqIds = pendingAcks.get(nodeId); if (reqIds == null) reqIds = F.addIfAbsent(pendingAcks, nodeId, new GridConcurrentHashSet<Long>()); reqIds.add(batchId); } }