configuration.isRehashEnabled(), isReceiver, isSender, self);
if (configuration.isRehashEnabled()) {
if (isReceiver) {
try {
RehashControlCommand cmd = cf.buildRehashControlCommand(PULL_STATE_LEAVE, self,
null, oldCH, newCH, leaversHandled);
log.debug("I {0} am pulling state from {1}", self, providers);
List<Response> resps = rpcManager.invokeRemotely(providers, cmd, SYNCHRONOUS,
configuration.getRehashRpcTimeout(), true);
log.debug("I {0} received response {1} ", self, resps);
for (Response r : resps) {
if (r instanceof SuccessfulResponse) {
Map<Object, InternalCacheValue> state = getStateFromResponse((SuccessfulResponse) r);
log.debug("I {0} am applying state {1} ", self, state);
dmi.applyState(newCH, state);
}
}
} finally {
RehashControlCommand c = cf.buildRehashControlCommand(LEAVE_REHASH_END, self);
rpcManager.invokeRemotely(providers, c, ASYNCHRONOUS, configuration.getRehashRpcTimeout(), false);
}
}
if (isSender) {
Set<Address> recCopy = new HashSet<Address>(receivers);