* @see net.sf.hajdbc.durability.coarse.CoarseDurability#recover(java.util.Map)
*/
@Override
public void recover(Map<InvocationEvent, Map<String, InvokerEvent>> map)
{
StateManager stateManager = this.cluster.getStateManager();
Balancer<Z, D> balancer = this.cluster.getBalancer();
D primary = balancer.primary();
for (Map.Entry<InvocationEvent, Map<String, InvokerEvent>> entry: map.entrySet())
{
InvocationEvent invocation = entry.getKey();
Map<String, InvokerEvent> invokers = entry.getValue();
if (!invokers.isEmpty())
{
for (D backup: balancer.backups())
{
if (this.deactivateSlave(primary, backup, invocation, invokers))
{
this.cluster.deactivate(backup, stateManager);
}
}
}
stateManager.afterInvocation(invocation);
}
}