Examples of IZkStateListener


Examples of org.I0Itec.zkclient.IZkStateListener

  }

  protected void simulateSessionExpiry(ZkClient zkClient) throws IOException,
      InterruptedException
  {
    IZkStateListener listener = new IZkStateListener()
    {
      @Override
      public void handleStateChanged(KeeperState state) throws Exception
      {
        LOG.info("In Old connection, state changed:" + state);
View Full Code Here

Examples of org.I0Itec.zkclient.IZkStateListener

  }

  @Test ()
  void testSessioExpire()
  {
    IZkStateListener listener = new IZkStateListener()
    {

      @Override
      public void handleStateChanged(KeeperState state) throws Exception
      {
View Full Code Here

Examples of org.I0Itec.zkclient.IZkStateListener

    // Logger.getRootLogger().setLevel(Level.DEBUG);
  }

  public static void disconnectSession(final ZkClient zkClient) throws Exception
  {
    IZkStateListener listener = new IZkStateListener()
    {
      @Override
      public void handleStateChanged(KeeperState state) throws Exception
      {
//         System.err.println("disconnectSession handleStateChanged. state: " + state);
View Full Code Here

Examples of org.I0Itec.zkclient.IZkStateListener

 
  public static void expireSession(final ZkClient zkClient) throws Exception
  {
    final CountDownLatch waitExpire = new CountDownLatch(1);

    IZkStateListener listener = new IZkStateListener()
    {
      @Override
      public void handleStateChanged(KeeperState state) throws Exception
      {
        // System.err.println("handleStateChanged. state: " + state);
View Full Code Here

Examples of org.I0Itec.zkclient.IZkStateListener

                            embededCanalServer.start(destination);
                            if (zkclientx != null) {
                                final String path = ZookeeperPathUtils.getDestinationClusterNode(destination, ip + ":"
                                                                                                              + port);
                                initCid(path);
                                zkclientx.subscribeStateChanges(new IZkStateListener() {

                                    public void handleStateChanged(KeeperState state) throws Exception {

                                    }
View Full Code Here

Examples of org.I0Itec.zkclient.IZkStateListener

        logger.info("## start the canal server[{}:{}]", ip, port);
        // 创建整个canal的工作节点
        final String path = ZookeeperPathUtils.getCanalClusterNode(ip + ":" + port);
        initCid(path);
        if (zkclientx != null) {
            this.zkclientx.subscribeStateChanges(new IZkStateListener() {

                public void handleStateChanged(KeeperState state) throws Exception {

                }
View Full Code Here

Examples of org.I0Itec.zkclient.IZkStateListener

                        try {
                            if (zkclientx != null) {
                                final String path = ZookeeperPathUtils.getDestinationClusterNode(destination, ip + ":"
                                                                                                              + port);
                                initCid(path);
                                zkclientx.subscribeStateChanges(new IZkStateListener() {

                                    public void handleStateChanged(KeeperState state) throws Exception {

                                    }
View Full Code Here

Examples of org.I0Itec.zkclient.IZkStateListener

        logger.info("## start the canal server[{}:{}]", ip, port);
        // 创建整个canal的工作节点
        final String path = ZookeeperPathUtils.getCanalClusterNode(ip + ":" + port);
        initCid(path);
        if (zkclientx != null) {
            this.zkclientx.subscribeStateChanges(new IZkStateListener() {

                public void handleStateChanged(KeeperState state) throws Exception {

                }
View Full Code Here

Examples of org.I0Itec.zkclient.IZkStateListener

            zkClient.close();
        }
    }

    public static void registerNotification(final SessionExpiredNotification notification) {
        getInstance().subscribeStateChanges(new IZkStateListener() {

            public void handleStateChanged(KeeperState state) throws Exception {

            }
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.