}
}
/** Removes the connection, the order, the colocation or both. */
public void removeConnection(final HbConnectionInfo hbci, final Host dcHost, final Application.RunMode runMode) {
final ServiceInfo siP = hbci.getLastServiceInfoParent();
final ServiceInfo siC = hbci.getLastServiceInfoChild();
mHbConnectionReadLock.lock();
final Edge edge;
try {
edge = hbconnectionToEdgeMap.get(hbci);
} finally {
mHbConnectionReadLock.unlock();
}
if (edgeIsOrderList.contains(edge)) {
siC.removeOrder(siP, dcHost, runMode);
}
final ServiceInfo siRsc = hbci.getLastServiceInfoRsc();
final ServiceInfo siWithRsc = hbci.getLastServiceInfoWithRsc();
if (edgeIsColocationList.contains(edge)) {
if (Application.isLive(runMode)) {
edgeIsOrderList.remove(edge);
edgeIsColocationList.remove(edge);
keepEdgeIsOrderList.remove(edge);