public boolean isCompletedState() {
    return COMPLETED_STATES.contains(this);
  }
Indicates whether or not this is a completed state.
Completed means that the associated task has stopped
running because it has finished successfully or has
failed.

@return true if this is a completed state.
ambari-server/src/main/java/org/apache/ambari/server/actionmanager/HostRoleStatus.java