code: @Override
      public void onPartitionChange(Map<String, List<String>> partition, Map<String, List<String>> removed,
              Map<String, List<String>> added) {
          log.debug("Executing: PartitionChange ");
          log.debugf("Local partition: %s", partition);
          log.debugf("Removed: %s", removed);
          log.debugf("Added: %s", added);
  
          if (!pendingData.isEmpty() || !pendingEvents.isEmpty()) {
              if (!pendingData.isEmpty()) {
                  log.warnf("Pending Data onPartitionChange: %s.", pendingData);
              }
              if (!!pendingEvents.isEmpty()) {
                  log.warnf("Pending Events onPartitionChange: %s.", pendingData);
              }
          }
  
          /*
              Removing old triggers for this node
           */
          for (Entry<String, List<String>> entry : removed.entrySet()) {
              String tenantId = entry.getKey();
              entry.getValue().stream().forEach(triggerId -> {
                  Trigger removeTrigger = new Trigger(tenantId, triggerId, "to-remove-from-alerts-engine");
                  removeTrigger(removeTrigger);
              });
          }
  
          /*
              Reloading new triggers for this node
           */
          for (Entry<String, List<String>> entry : added.entrySet()) {
              String tenantId = entry.getKey();
              entry.getValue().stream().forEach(triggerId -> {
                  reloadTrigger(tenantId, triggerId);
              });
          }
      }
docs: /*
  This listener method is invoked on distributed scenarios.
  When topology changes, new nodes added or removed, PartitionManager recalculate global triggers partition.
  On each node, PartitionManager invokes this method to indicate triggers should hold, and the "delta" of
  additions/removals.
  With this delta, the process of remove/reload triggers across cluster is minimized.