docs: public static void sync(String sourceUri, String targetUri) throws IOException, URISyntaxException {
          RedisURI suri = new RedisURI(sourceUri);
          RedisURI turi = new RedisURI(targetUri);
          final ExampleClient target = new ExampleClient(turi.getHost(), turi.getPort());
          Configuration tconfig = Configuration.valueOf(turi);
          if (tconfig.getAuthPassword() != null) {
              Object auth = target.send(AUTH, tconfig.getAuthPassword().getBytes());
              System.out.println("AUTH:" + auth);
          }
          final AtomicInteger dbnum = new AtomicInteger(-1);
          Replicator r = dress(new RedisReplicator(suri));
  
          r.addEventListener(new EventListener() {
              @Override
              public void onEvent(Replicator replicator, Event event) {
                  if (event instanceof DumpKeyValuePair) {
                      DumpKeyValuePair dkv = (DumpKeyValuePair) event;
                      // Step1: select db
                      DB db = dkv.getDb();
                      int index;
                      if (db != null && (index = (int) db.getDbNumber()) != dbnum.get()) {
                          target.send(SELECT, toByteArray(index));
                          dbnum.set(index);
                          System.out.println("SELECT:" + index);
                      }
  
                      // Step2: restore dump data
                      if (dkv.getExpiredMs() == null) {
                          Object r = target.restore(dkv.getKey(), 0L, dkv.getValue(), true);
                          System.out.println(r);
                      } else {
                          long ms = dkv.getExpiredMs() - System.currentTimeMillis();
                          if (ms <= 0) return;
                          Object r = target.restore(dkv.getKey(), ms, dkv.getValue(), true);
                          System.out.println(r);
                      }
                  }
  
                  if (event instanceof DefaultCommand) {
                      // Step3: sync aof command
                      DefaultCommand dc = (DefaultCommand) event;
                      Object r = target.send(dc.getCommand(), dc.getArgs());
                      System.out.println(r);
                  }
              }
          });
  
          r.addCloseListener(new CloseListener() {
              @Override
              public void handle(Replicator replicator) {
                  target.close();
              }
          });
          r.open();
      }