@Test public void testGetTimestamp() throws IOException, InterruptedException, TTransportException, ChronosException { final ChronosServer chronosServer = createChronosServer(new HostPort("127.0.0.1", 2187)); Thread thread = new Thread() { @Override public void run() { chronosServer.run(); } }; thread.start(); Thread.sleep(500); ChronosClientWatcher chronosClientWatcher = createChronosClientWatcher(); chronosClientWatcher.getTimestamp(); chronosServer.stopThriftServer(); chronosServer.getFailoverWatcher().close(); chronosClientWatcher.close(); assertTrue(true); }
public long getTimestamp() throws IOException { return getTimestamps(1); }
ChronosClientWatcher implements Watcher { public long getTimestamp() throws IOException { return getTimestamps(1); } }
ChronosClientWatcher implements Watcher { public long getTimestamp() throws IOException { return getTimestamps(1); } ChronosClientWatcher(Properties properties); }
ChronosClientWatcher implements Watcher { public long getTimestamp() throws IOException { return getTimestamps(1); } ChronosClientWatcher(Properties properties); long getTimestamps(int range); long getTimestamp(); @Override void process(WatchedEvent event); void waitToInitZooKeeper(long maxWaitMillis); byte[] getData(ChronosClientWatcher chronosClientWatcher, String znode); void close(); ZooKeeper getZooKeeper(); }
ChronosClientWatcher implements Watcher { public long getTimestamp() throws IOException { return getTimestamps(1); } ChronosClientWatcher(Properties properties); long getTimestamps(int range); long getTimestamp(); @Override void process(WatchedEvent event); void waitToInitZooKeeper(long maxWaitMillis); byte[] getData(ChronosClientWatcher chronosClientWatcher, String znode); void close(); ZooKeeper getZooKeeper();  }