modeToUse = preferredMode;
if (trace)
log.trace("callRemoteMethods(): valid members are " + recipients + " methods: " + command + " Using OOB? " + useOutOfBandMessage);
if (channel.flushSupported() && !flushBlockGate.await(configuration.getStateRetrievalTimeout(), TimeUnit.MILLISECONDS))
{
throw new TimeoutException("State retrieval timed out waiting for flush unblock.");
}
useOutOfBandMessage = false;
RspList rsps = rpcDispatcher.invokeRemoteCommands(recipients, command, modeToUse, timeout, isUsingBuddyReplication, useOutOfBandMessage, responseFilter);
if (mode == GroupRequest.GET_NONE) return Collections.emptyList();// async case
if (trace)
log.trace("(" + getLocalAddress() + "): responses for method " + command.getClass().getSimpleName() + ":\n" + rsps);
// short-circuit no-return-value calls.
if (rsps == null) return Collections.emptyList();
List<Object> retval = new ArrayList<Object>(rsps.size());
for (Rsp rsp : rsps.values())
{
if (rsp.wasSuspected() || !rsp.wasReceived())
{
CacheException ex;
if (rsp.wasSuspected())
{
ex = new SuspectException("Suspected member: " + rsp.getSender());
}
else
{
ex = new TimeoutException("Replication timeout for " + rsp.getSender());
}
retval.add(new ReplicationException("rsp=" + rsp, ex));
success = false;
}
else