Package org.apache.zookeeper.server.NIOServerCnxn

Examples of org.apache.zookeeper.server.NIOServerCnxn.Factory


   * @version 3.3.0
   * @since 3.3.0
   */
  private static Factory initZKCxnFactory(ServerConfig zkServerConfig) {
    _log.debug("Started creating Zookeeper connection factory...");
    Factory zkCnxnFactory = null;
    try {
      zkCnxnFactory = new NIOServerCnxn.Factory(
          zkServerConfig.getClientPortAddress(),
          zkServerConfig.getMaxClientCnxns());
    } catch (IOException e) {
View Full Code Here


    try {
      ZooDiscoveryContainer.zooKeeperServer = new ZooKeeperServer();
      FileTxnSnapLog fileTxnSnapLog = new FileTxnSnapLog(conf.getZookeeperDataFile(), conf.getZookeeperDataFile());
      ZooDiscoveryContainer.zooKeeperServer.setTxnLogFactory(fileTxnSnapLog);
      ZooDiscoveryContainer.zooKeeperServer.setTickTime(conf.getTickTime());
      Factory cnxnFactory = new NIOServerCnxn.Factory(new InetSocketAddress(conf.getClientPort()));
      cnxnFactory.startup(ZooDiscoveryContainer.zooKeeperServer);
    } catch (Exception e) {
      Logger.log(LogService.LOG_ERROR,
          "Zookeeper server cannot be started! Possibly another instance is already running on the same port. ", e);
    }
View Full Code Here

TOP

Related Classes of org.apache.zookeeper.server.NIOServerCnxn.Factory

Copyright © 2018 www.massapicom. 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.