code: public void setPersistentTimestamp(long newTimestamp) throws FatalChronosException,
        ChronosException {
      if (newTimestamp <= persistentTimestamp) {
        throw new FatalChronosException("Fatal error to set a smaller timestamp");
      }
  
      if (LOG.isDebugEnabled()) {
        LOG.debug("Setting persistent timestamp " + newTimestamp + " in ZooKeeper");
      }
  
      for (int i = 0; i <= connectRetryTimes; ++i) {
        try {
          ZooKeeperUtil.setData(this, persistentTimestampZnode, ZooKeeperUtil.longToBytes(newTimestamp));
          persistentTimestamp = newTimestamp;
          break;
        } catch (KeeperException e) {
          if (i == connectRetryTimes) {
            throw new ChronosException(
                "Error to set persistent timestamp in ZooKeeper after retrying", e);
          }
          LOG.info("Exception to set persistent timestamp in ZooKeeper, retry " + (i + 1) + " times");
        }
      }
    }
docs: Set persistent timestamp in ZooKeeper.
  
  @param newTimestamp the new value to set
  @throws FatalChronosException if try to set a small value
  @throws ChronosException if error to set value in ZooKeeper