/** This method runs with rsp_mutex locked (called by <code>execute()</code>). */
private boolean doExecute(boolean use_anycasting, long timeout) throws Exception {
long start_time=0;
Address suspect;
req_id=getRequestId();
reset(null); // clear 'responses' array
synchronized(requests) {
for(int i=0; i < suspects.size(); i++) { // mark all suspects in 'received' array
suspect=(Address)suspects.elementAt(i);
Rsp rsp=(Rsp)requests.get(suspect);
if(rsp != null) {
rsp.setSuspected(true);
break; // we can break here because we ensure there are no duplicate members
}
}
}
try {
if(log.isTraceEnabled()) log.trace(new StringBuffer("sending request (id=").append(req_id).append(')'));
if(corr != null) {
java.util.List tmp=new Vector(members);
corr.sendRequest(req_id, tmp, request_msg, rsp_mode == GET_NONE? null : this, use_anycasting);
}
else {
if(use_anycasting) {
List tmp=new ArrayList(members);
Message copy;
Address mbr;
for(Iterator it=tmp.iterator(); it.hasNext();) {
mbr=(Address)it.next();
copy=request_msg.copy(true);
copy.setDest(mbr);
transport.send(copy);