public void handleDataDeleted(String dataPath) throws Exception {
      if (!isValid()) {
        LOG.warn(String.format("Skipping handleDataDeleted for %s from wrong generation. Current generation: %s; " +
            "Callback generation: %s", listenerName, zkUtils.getGeneration(), generation));
      } else {
        doHandleDataDeleted(dataPath);
      }
    }
A generation-aware {@link IZkDataListener} that only responds to events that occur in the current-generation.
Each generation is identified by a generation-id which is scoped to the currently active Zk session and
is incremented each time a session expires. This ensures that events corresponding to the previous generation
are not acted on.
samza-core/src/main/java/org/apache/samza/zk/ZkUtils.java