final FindUnfinishedJobsTask rt = new FindUnfinishedJobsTask(this);
rt.run();
}
// we run the checker task twice, now and shortly after the topology has changed.
final CheckTopologyTask mt = new CheckTopologyTask(this);
mt.fullRun(!isConfigChange, isConfigChange);
// and run checker again in some seconds (if leader)
// notify listeners afterwards
scheduler.schedule(new Runnable() {
@Override
public void run() {
if ( newCaps.isLeader() && newCaps.isActive() ) {
mt.assignUnassignedJobs();
}
// start listeners
synchronized ( listeners ) {
if ( topologyCapabilities != null && newCaps.isActive() ) {
notifiyListeners();