use of org.nd4j.parameterserver.distributed.messages.complete.VectorCompleteMessage in project nd4j by deeplearning4j.
the class VectorAggregation method processMessage.
/**
* Vector aggregations are saved only by Shards started aggregation process. All other Shards are ignoring this meesage
*/
@Override
public void processMessage() {
if (clipboard.isTracking(this.originatorId, this.getTaskId())) {
clipboard.pin(this);
if (clipboard.isReady(this.originatorId, taskId)) {
VoidAggregation aggregation = clipboard.unpin(this.originatorId, taskId);
// FIXME: probably there's better solution, then "screw-and-forget" one
if (aggregation == null)
return;
VectorCompleteMessage msg = new VectorCompleteMessage(taskId, aggregation.getAccumulatedResult());
msg.setOriginatorId(aggregation.getOriginatorId());
transport.sendMessage(msg);
}
}
}
Aggregations