/** * @param corr The request correlator to be used. A request correlator sends requests tagged with a unique ID and * notifies the sender when matching responses are received. The reason {@code GroupRequest} uses * it instead of a {@code Transport} is that multiple requests/responses might be sent/received concurrently * @param targets The targets, which are supposed to receive the message. Any receiver not in this set will * discard the message. Targets are always a subset of the current membership * @param options The request options to be used for this call */ public GroupRequest(RequestCorrelator corr, Collection<Address> targets, RequestOptions options) { super(corr, options); rsps=new RspList<>(targets.size()); targets.forEach(target -> rsps.put(target, new Rsp<>())); }
public RspList<T> addRsp(Address sender, T retval) { Rsp<T> rsp=get(sender); if(rsp != null) { rsp.setValue(retval); return this; } put(sender, new Rsp<>(retval)); return this; }
/** * @param corr The request correlator to be used. A request correlator sends requests tagged with a unique ID and * notifies the sender when matching responses are received. The reason {@code GroupRequest} uses * it instead of a {@code Transport} is that multiple requests/responses might be sent/received concurrently * @param targets The targets, which are supposed to receive the message. Any receiver not in this set will * discard the message. Targets are always a subset of the current membership * @param options The request options to be used for this call */ public GroupRequest(RequestCorrelator corr, Collection<Address> targets, RequestOptions options) { super(corr, options); rsps=new RspList<>(targets.size()); targets.forEach(target -> rsps.put(target, new Rsp<>())); }
public RspList<T> addRsp(Address sender, T retval) { Rsp<T> rsp=get(sender); if(rsp != null) { rsp.setValue(retval); return this; } put(sender, new Rsp<>(retval)); return this; }