for (Map.Entry<String, HAPartitionStateTransfer> entry : this.initialStateRecipients.entrySet())
{
log.debug("Fetching state for " + entry.getKey());
Future<SerializableStateTransferResult> future = this.getServiceState(entry.getKey());
SerializableStateTransferResult result = future.get(this.getStateTransferTimeout(), TimeUnit.MILLISECONDS);
if (result.stateReceived())
{
if (result.getStateTransferException() != null)
{
throw result.getStateTransferException();
}
entry.getValue().setCurrentState(result.getState());
log.debug("Received state for " + entry.getKey());
}
else if (result.getStateTransferException() != null)
{
throw result.getStateTransferException();
}
else
{
log.debug("No state available for " + entry.getKey() + " -- we must be sole member of group");
}