myPlatformManager.removeReplica(monitoredSvcMgr, false);
myPlatformManager.removeNode(new NodeDescriptor(n), false);
// Broadcast a 'removeReplica()' method (exclude yourself from bcast)
GenericCommand hCmd = new GenericCommand(MainReplicationSlice.H_REMOVEREPLICA, MainReplicationSlice.NAME, null);
hCmd.addParam(monitoredSvcMgr);
hCmd.addParam(new Integer(monitoredLabel));
broadcastToReplicas(hCmd, EXCLUDE_MYSELF);
int oldLabel = myLabel;
adjustLabels(monitoredLabel);
// -- Attach to the new neighbour slice...
MainReplicationSlice newSlice = (MainReplicationSlice) replicas.get(monitoredLabel);
attachTo(monitoredLabel, newSlice);
// Become the new leader if it is the case...
if ((oldLabel != 0) && (myLabel == 0)) {
myLogger.log(Logger.INFO, "-- I'm the new leader ---");
myContainer.becomeLeader(feeder);
VerticalCommand cmd = new GenericCommand(MainReplicationSlice.LEADERSHIP_ACQUIRED, NAME, null);
submit(cmd);
}
else {
if (feeder != null) {
// NO new AMS --> No need for intercepting events anymore