public void expire(String version) {
    String barrierStatePath = keyBuilder.getBarrierStatePath(version);
    State barrierState = State.valueOf(zkUtils.getZkClient().readData(barrierStatePath));
    if (Objects.equals(barrierState, State.NEW)) {
      LOG.info(String.format("Expiring the barrier version: %s. Marking the barrier state: %s as %s.", version, barrierStatePath, State.TIMED_OUT));
      zkUtils.writeData(keyBuilder.getBarrierStatePath(version), State.TIMED_OUT.toString());
    } else {
      LOG.debug(String.format("Barrier version: %s is at: %s state. Not marking barrier as %s.", version, barrierState, State.TIMED_OUT));
    }
  }
Expires the barrier version by marking it as TIMED_OUT

@param version Version associated with the Barrier
samza-core/src/main/java/org/apache/samza/zk/ZkBarrierForVersionUpgrade.java