elasticsearch/elasticsearch — pull request #7511 by bleskes (2014-08-29 15:13:03+00:00)
Title: [Cluster] Refactored ClusterStateUpdateTask protection against execution on a non master

Previous implementation used a marker interface and had no explicit failure call back for the case update task was run on a non master (i.e., the master stepped down after it was submitted). That lead to a couple of instance of checks.

This approach moves ClusterStateUpdateTask from an interface to an abstract class, which allows adding a flag to indicate whether it should only run on master nodes (defaults to true). It also adds an explicit onNoLongerMaster call back to allow different error handling for that case. This also removed the need for the NoLongerMaster.

Note: this pr is agains the feature/improve_zen branch , as part of the review process of #7493