Examples of subscribeDataChanges()


Examples of org.apache.helix.manager.zk.ZkClient.subscribeDataChanges()

    // make sure "/testName/test" doesn't exist
    final String path = "/" + testName + "/test";
    client.delete(path);

    ZkListener listener = new ZkListener();
    client.subscribeDataChanges(path, listener);
    client.subscribeChildChanges(path, listener);

    ZkTestHelper.expireSession(client);

    boolean succeed = listener._childChangeCountDown.await(10, TimeUnit.SECONDS);
View Full Code Here

Examples of org.apache.helix.manager.zk.ZkClient.subscribeDataChanges()

    // make sure "/testName/test" doesn't exist
    final String path = "/" + testName + "/test";
    client.createPersistent(path, true);

    ZkListener listener = new ZkListener();
    client.subscribeDataChanges(path, listener);
    client.subscribeChildChanges(path, listener);

    // listener should be in both ZkClient#_dataListener and ZkClient#_childListener set
    Map<String, Set<IZkDataListener>> dataListenerMap = ZkTestHelper.getZkDataListener(client);
    Assert.assertEquals(dataListenerMap.size(), 1, "ZkClient#_dataListener should have 1 listener");
View Full Code Here

Examples of org.apache.helix.manager.zk.ZkClient.subscribeDataChanges()

    String extViewPath = PropertyPathConfig.getPath(PropertyType.EXTERNALVIEW, clusterName);
    zkClient.subscribeChildChanges(extViewPath, listener);
    for (String child : zkClient.getChildren(extViewPath)) {
      String childPath = extViewPath.equals("/") ? extViewPath + child : extViewPath + "/" + child;
      zkClient.subscribeDataChanges(childPath, listener);
    }

    // do initial verify
    boolean result = verifier.verify();
    if (result == false) {
View Full Code Here

Examples of org.apache.helix.manager.zk.ZkClient.subscribeDataChanges()

        // make sure "/testName/test" doesn't exist
        final String path = "/" + testName + "/test";
        client.delete(path);

        ZkListener listener = new ZkListener();
        client.subscribeDataChanges(path, listener);
        client.subscribeChildChanges(path, listener);

        ZkTestHelper.expireSession(client);

        boolean succeed = listener._childChangeCountDown.await(10, TimeUnit.SECONDS);
View Full Code Here

Examples of org.apache.helix.manager.zk.ZkClient.subscribeDataChanges()

        // make sure "/testName/test" doesn't exist
        final String path = "/" + testName + "/test";
        client.createPersistent(path, true);

        ZkListener listener = new ZkListener();
        client.subscribeDataChanges(path, listener);
        client.subscribeChildChanges(path, listener);

        // listener should be in both ZkClient#_dataListener and ZkClient#_childListener set
        Map<String, Set<IZkDataListener>> dataListenerMap = ZkTestHelper.getZkDataListener(client);
        Assert.assertEquals(dataListenerMap.size(), 1, "ZkClient#_dataListener should have 1 listener");
View Full Code Here

Examples of org.apache.helix.manager.zk.ZkClient.subscribeDataChanges()

    zkClient.subscribeChildChanges(extViewPath, listener);
    for (String child : zkClient.getChildren(extViewPath))
    {
      String childPath =
          extViewPath.equals("/") ? extViewPath + child : extViewPath + "/" + child;
      zkClient.subscribeDataChanges(childPath, listener);
    }

    // do initial verify
    boolean result = verifier.verify();
    if (result == false)
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.