public boolean retrieveState(String cacheName, Address address, long timeout) throws StateTransferException {
boolean cleanup = false;
try {
StateTransferMonitor mon = new StateTransferMonitor();
if (stateTransfersInProgress.putIfAbsent(cacheName, mon) != null)
throw new StateTransferException("There already appears to be a state transfer in progress for the cache named " + cacheName);
cleanup = true;
((JChannel) channel).getState(toJGroupsAddress(address), cacheName, timeout, false);
mon.waitForState();
return mon.getSetStateException() == null;