@Override
  public int compareTo(Object o) {
    if ((o != null ) && (o instanceof Host)) {
      return getHostName().compareTo(((Host) o).getHostName());
    } else {
      return -1;
    }
  }
Used to publish events relating to host CRUD operations.
ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java