Package org.apache.zookeeper.server

Examples of org.apache.zookeeper.server.NIOServerCnxnFactory.shutdown()


    // Shutdown the current active one
    NIOServerCnxnFactory standaloneServerFactory =
      standaloneServerFactoryList.get(backupZKServerIndex);
    int clientPort = clientPortList.get(backupZKServerIndex);

    standaloneServerFactory.shutdown();
    if (!waitForServerDown(clientPort, CONNECTION_TIMEOUT)) {
      throw new IOException("Waiting for shutdown of standalone server");
    }

    // remove this backup zk server
View Full Code Here


    for (int i = 0; i < standaloneServerFactoryList.size(); i++) {
      NIOServerCnxnFactory standaloneServerFactory =
        standaloneServerFactoryList.get(i);     
      int clientPort = clientPortList.get(i);
     
      standaloneServerFactory.shutdown();
      if (!waitForServerDown(clientPort, CONNECTION_TIMEOUT)) {
        throw new IOException("Waiting for shutdown of standalone server");
      }
    }
View Full Code Here

    // Shutdown the current active one
    NIOServerCnxnFactory standaloneServerFactory =
      standaloneServerFactoryList.get(activeZKServerIndex);
    int clientPort = clientPortList.get(activeZKServerIndex);
   
    standaloneServerFactory.shutdown();
    if (!waitForServerDown(clientPort, CONNECTION_TIMEOUT)) {
      throw new IOException("Waiting for shutdown of standalone server");
    }
   
    // remove the current active zk server
View Full Code Here

    // Shutdown the current active one
    NIOServerCnxnFactory standaloneServerFactory =
      standaloneServerFactoryList.get(backupZKServerIndex);
    int clientPort = clientPortList.get(backupZKServerIndex);
   
    standaloneServerFactory.shutdown();
    if (!waitForServerDown(clientPort, CONNECTION_TIMEOUT)) {
      throw new IOException("Waiting for shutdown of standalone server");
    }
   
    // remove this backup zk server
View Full Code Here

    for (int i = 0; i < standaloneServerFactoryList.size(); i++) {
      NIOServerCnxnFactory standaloneServerFactory =
        standaloneServerFactoryList.get(i);
      int clientPort = clientPortList.get(i);

      standaloneServerFactory.shutdown();
      if (!waitForServerDown(clientPort, CONNECTION_TIMEOUT)) {
        throw new IOException("Waiting for shutdown of standalone server");
      }
    }
View Full Code Here

    // Shutdown the current active one
    NIOServerCnxnFactory standaloneServerFactory =
      standaloneServerFactoryList.get(activeZKServerIndex);
    int clientPort = clientPortList.get(activeZKServerIndex);

    standaloneServerFactory.shutdown();
    if (!waitForServerDown(clientPort, CONNECTION_TIMEOUT)) {
      throw new IOException("Waiting for shutdown of standalone server");
    }

    // remove the current active zk server
View Full Code Here

    // Shutdown the current active one
    NIOServerCnxnFactory standaloneServerFactory =
      standaloneServerFactoryList.get(backupZKServerIndex);
    int clientPort = clientPortList.get(backupZKServerIndex);

    standaloneServerFactory.shutdown();
    if (!waitForServerDown(clientPort, CONNECTION_TIMEOUT)) {
      throw new IOException("Waiting for shutdown of standalone server");
    }

    // remove this backup zk server
View Full Code Here

        assertTrue(groupCondition.waitForMaster(5, TimeUnit.SECONDS));


        group.close();
        curator.close();
        cnxnFactory.shutdown();
        cnxnFactory.join();
    }

    @Test
    public void testJoinBeforeConnect() throws Exception {
View Full Code Here

        assertTrue(groupCondition.waitForMaster(5, TimeUnit.SECONDS));


        group.close();
        curator.close();
        cnxnFactory.shutdown();
        cnxnFactory.join();
    }

    @Test
    public void testRejoinAfterDisconnect() throws Exception {
View Full Code Here

        curator.getZookeeperClient().blockUntilConnectedOrTimedOut();
        assertTrue(groupCondition.waitForConnected(5, TimeUnit.SECONDS));
        assertTrue(groupCondition.waitForMaster(5, TimeUnit.SECONDS));

        cnxnFactory.shutdown();
        cnxnFactory.join();

        groupCondition.waitForDisconnected(5, TimeUnit.SECONDS);
        group.remove(groupCondition);
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.