Package org.apache.zookeeper.server

Examples of org.apache.zookeeper.server.ConnectionMXBean


    do {
      // Find the AM session and expire it
      Set<ObjectName> connectionBeans = mbeanServer.queryNames(ObjectName.WILDCARD, query);
      for (ObjectName objectName : connectionBeans) {

        ConnectionMXBean connectionBean = MBeanServerInvocationHandler.newProxyInstance(mbeanServer, objectName,
                                                                                        ConnectionMXBean.class, false);
        for (String node : connectionBean.getEphemeralNodes()) {
          if (node.endsWith("/instances/" + controller.getRunId().getId())) {
            // This is the AM, expire the session.
            LOG.info("Kill AM session {}", connectionBean.getSessionId());
            connectionBean.terminateSession();
            return true;
          }
        }
      }
    } while (stopwatch.elapsedTime(timeoutUnit) < timeout);
View Full Code Here


    do {
      // Find the AM session and expire it
      Set<ObjectName> connectionBeans = mbeanServer.queryNames(ObjectName.WILDCARD, query);
      for (ObjectName objectName : connectionBeans) {

        ConnectionMXBean connectionBean = MBeanServerInvocationHandler.newProxyInstance(mbeanServer, objectName,
                                                                                        ConnectionMXBean.class, false);
        for (String node : connectionBean.getEphemeralNodes()) {
          if (node.endsWith("/instances/" + controller.getRunId().getId())) {
            // This is the AM, expire the session.
            LOG.info("Kill AM session {}", connectionBean.getSessionId());
            connectionBean.terminateSession();
            return true;
          }
        }
      }
    } while (stopwatch.elapsedTime(timeoutUnit) < timeout);
View Full Code Here

TOP

Related Classes of org.apache.zookeeper.server.ConnectionMXBean

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.