Examples of ChronosClientWatcher


Examples of com.xiaomi.infra.chronos.client.ChronosClientWatcher

    properties.setProperty(ChronosClient.ZK_QUORUM,
      ZKConfig.getZKQuorumServersString(TEST_UTIL.getConfiguration()));
    properties.setProperty(ChronosClient.SESSION_TIMEOUT, String.valueOf(3000));
    properties.setProperty(ChronosClient.CONNECT_RETRY_TIMES, String.valueOf(10));

    return new ChronosClientWatcher(properties);
  }
View Full Code Here

Examples of com.xiaomi.infra.chronos.client.ChronosClientWatcher

      }
    };
    thread.start();

    Thread.sleep(500); // wait for server to start
    ChronosClientWatcher chronosClientWatcher = createChronosClientWatcher();
    chronosClientWatcher.getTimestamp();
   
    chronosServer.stopThriftServer();
    chronosServer.getFailoverWatcher().close();
    chronosClientWatcher.close();
    assertTrue(true);
  }
View Full Code Here

Examples of com.xiaomi.infra.chronos.client.ChronosClientWatcher

    properties.setProperty(ChronosClient.ZK_QUORUM,
      ZKConfig.getZKQuorumServersString(TEST_UTIL.getConfiguration()));
    properties.setProperty(ChronosClient.SESSION_TIMEOUT, String.valueOf(3000));
    properties.setProperty(ChronosClient.CONNECT_RETRY_TIMES, String.valueOf(10));

    return new ChronosClient(new ChronosClientWatcher(properties));
  }
View Full Code Here

Examples of com.xiaomi.infra.chronos.client.ChronosClientWatcher

   *
   * @param properties the properties of ChronosClient
   * @throws IOException when error to construct ChronosClientWatcher
   */
  public ChronosClient(Properties properties) throws IOException {
    this.chronosClientWatcher = new ChronosClientWatcher(properties);
  }
View Full Code Here

Examples of com.xiaomi.infra.chronos.client.ChronosClientWatcher

    Properties properties = new Properties();
    properties.setProperty(ZK_QUORUM, zkQuorum);
    properties.setProperty(CLUSTER_NAME, clusterName);
    properties.setProperty(SESSION_TIMEOUT, String.valueOf(30000));
    properties.setProperty(CONNECT_RETRY_TIMES, String.valueOf(10));
    this.chronosClientWatcher = new ChronosClientWatcher(properties);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.