@Test public void testZkClientConfig() throws Exception { CuratorFramework client = initZk("127.0.0.1:" + PORT, "ut-ns"); assertEquals(20000L, client.getZookeeperClient().getConnectionTimeoutMs()); assertEquals(20000L, client.getZookeeperClient().getZooKeeper().getSessionTimeout()); ExponentialBackoffRetry retryPolicy = (ExponentialBackoffRetry) client.getZookeeperClient().getRetryPolicy(); assertEquals(3, retryPolicy.getN()); System.setProperty("VIP_SATURN_USE_UNSTABLE_NETWORK_SETTING", "true"); SystemEnvProperties.loadProperties(); client = initZk("127.0.0.1:" + PORT, "ut-ns"); assertEquals(40000L, client.getZookeeperClient().getConnectionTimeoutMs()); assertEquals(40000L, client.getZookeeperClient().getZooKeeper().getSessionTimeout()); retryPolicy = (ExponentialBackoffRetry) client.getZookeeperClient().getRetryPolicy(); assertEquals(9, retryPolicy.getN()); }
@Override public long getSessionTimeout() { return sessionTimeout; }
ZookeeperRegistryCenter implements CoordinatorRegistryCenter { @Override public long getSessionTimeout() { return sessionTimeout; } }
ZookeeperRegistryCenter implements CoordinatorRegistryCenter { @Override public long getSessionTimeout() { return sessionTimeout; } ZookeeperRegistryCenter(final ZookeeperConfiguration zkConfig); }
ZookeeperRegistryCenter implements CoordinatorRegistryCenter { @Override public long getSessionTimeout() { return sessionTimeout; } ZookeeperRegistryCenter(final ZookeeperConfiguration zkConfig); ZookeeperConfiguration getZkConfig(); @Override String getExecutorName(); @Override void setExecutorName(String executorName); @Override void init(); @Override void close(); @Override String get(final String key); @Override String getDirectly(final String key); @Override List<String> getChildrenKeys(final String key); @Override boolean isExisted(final String key); Stat getStat(final String key); @Override void persist(final String key, final String value); @Override void update(final String key, final String value); @Override void persistEphemeral(final String key, final String value); @Override void persistEphemeralSequential(final String key); @Override void remove(final String key); @Override long getRegistryCenterTime(final String key); @Override Object getRawClient(); void setClient(CuratorFramework client); @Override void addConnectionStateListener(final ConnectionStateListener listener); @Override void removeConnectionStateListener(final ConnectionStateListener listener); @Override long getSessionTimeout(); void setSessionTimeout(int sessionTimeout); @Override String getNamespace(); @Override boolean isConnected(); @Override CoordinatorRegistryCenter usingNamespace(String namespace); }
ZookeeperRegistryCenter implements CoordinatorRegistryCenter { @Override public long getSessionTimeout() { return sessionTimeout; } ZookeeperRegistryCenter(final ZookeeperConfiguration zkConfig); ZookeeperConfiguration getZkConfig(); @Override String getExecutorName(); @Override void setExecutorName(String executorName); @Override void init(); @Override void close(); @Override String get(final String key); @Override String getDirectly(final String key); @Override List<String> getChildrenKeys(final String key); @Override boolean isExisted(final String key); Stat getStat(final String key); @Override void persist(final String key, final String value); @Override void update(final String key, final String value); @Override void persistEphemeral(final String key, final String value); @Override void persistEphemeralSequential(final String key); @Override void remove(final String key); @Override long getRegistryCenterTime(final String key); @Override Object getRawClient(); void setClient(CuratorFramework client); @Override void addConnectionStateListener(final ConnectionStateListener listener); @Override void removeConnectionStateListener(final ConnectionStateListener listener); @Override long getSessionTimeout(); void setSessionTimeout(int sessionTimeout); @Override String getNamespace(); @Override boolean isConnected(); @Override CoordinatorRegistryCenter usingNamespace(String namespace);  }