code: private void updateReaderGroupData(String path, Function<ReaderGroupData, ReaderGroupData> updater) throws Exception {
          final long initialMillis = 100L;
          final int multiplier = 2;
          final int attempts = 10;
          final long maxDelay = 2000;
  
          Stat stat = new Stat();
  
          Retry.withExpBackoff(initialMillis, multiplier, attempts, maxDelay)
                  .retryingOn(KeeperException.BadVersionException.class)
                  .throwingOn(Exception.class)
                  .run(() -> {
  
                      byte[] data = client.getData().storingStatIn(stat).forPath(path);
                      ReaderGroupData groupData = groupDataSerializer.deserialize(ByteBuffer.wrap(data));
                      groupData = updater.apply(groupData);
                      byte[] newData = groupDataSerializer.serialize(groupData).array();
  
                      client.setData()
                              .withVersion(stat.getVersion())
                              .forPath(path, newData);
                      return null;
                  });
      }
docs: Updates the reader group data at specified path by applying the updater method on the existing data.
  It repeatedly invokes conditional update on specified path until is succeeds or max attempts (10) are exhausted.
  
  @param path Reader group node path.
  @param updater Function to obtain the new data value from existing data value.
  @throws Exception Throws exception thrown from Curator, or from application of updater method.