public boolean isConnectorStarted() { return connectorStarted.getCount() == 0 || (connectorServer != null && connectorServer.isActive()); }
.until(() -> cs.isActive());
public boolean isActive() { return mbserver != null && connectorServer != null && connectorServer.isActive(); }
public final void shutdown() { try { if (connectorServer != null && connectorServer.isActive()) { connectorServer.stop(); log.warn("JMXConnector stop"); if (!isHutdownHookCalled) { Runtime.getRuntime().removeShutdownHook(shutdownHookThread); } } } catch (IOException e) { log.error("Shutdown Xmemcached MBean server error", e); } }
@Override public void run() { try { isHutdownHookCalled = true; if (connectorServer.isActive()) { connectorServer.stop(); log.warn("JMXConnector stop"); } } catch (IOException e) { log.error("Shutdown Xmemcached MBean server error", e); } } };
private void initialize() { if (mbserver != null && connectorServer != null && connectorServer.isActive()) { return;
/** * Determines whether the JMX Connector server has been started and is running. * * @return true, if the connector server is running, otherwise false */ public boolean isRunning() { return connectorServer != null && connectorServer.isActive(); }
/** * Determines whether the JMX Connector server has been started and is running. * * @return true, if the connector server is running, otherwise false */ public boolean isRunning() { return connectorServer != null && connectorServer.isActive(); }
public boolean isActive() { return connectorServer.isActive(); }
public boolean isStarted() { return this.jmxConnectorServer.isActive(); } }
public boolean isActive() { return mbserver != null && connectorServer != null && connectorServer.isActive(); }
public boolean isConnectorStarted() { return connectorStarted.getCount() == 0 || (connectorServer != null && connectorServer.isActive()); }
public boolean isConnectorStarted() { return connectorStarted.getCount() == 0 || (connectorServer != null && connectorServer.isActive()); }
public boolean isConnectorStarted() { return connectorStarted.getCount() == 0 || (connectorServer != null && connectorServer.isActive()); }
public boolean isConnectorStarted() { return connectorStarting.get() || (connectorServer != null && connectorServer.isActive()); }
@Override public void run() { try { isHutdownHookCalled = true; if (connectorServer.isActive()) { connectorServer.stop(); log.warn("JMXConnector stop"); } } catch (IOException e) { log.error("Shutdown Xmemcached MBean server error", e); } } };
public final void shutdown() { try { if (connectorServer != null && connectorServer.isActive()) { connectorServer.stop(); log.warn("JMXConnector stop"); if (!isHutdownHookCalled) { Runtime.getRuntime().removeShutdownHook(shutdownHookThread); } } } catch (IOException e) { log.error("Shutdown Xmemcached MBean server error", e); } }
@Override public void shutdown() { if ((connectorServer != null) && connectorServer.isActive()) { if (slpRegistrar != null) { slpRegistrar.shutdown(); } try { LOGGER.info("Stopping the JMX Connector Server.."); connectorServer.stop(); LOGGER.info("JMX Connector Server has terminated."); } catch (IOException e) { LOGGER.error("Error stopping JMX Connection Servcer", e); } try { UnicastRemoteObject.unexportObject(registry, true); } catch (NoSuchObjectException e) { LOGGER.error("Error closing down registry", e); } } }
@Override protected final void init() { synchronized (this) { if (this.jmxEnabled && !this.isTerminated()) { final MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); if (this.serverObjectName != null) { try { mbs.registerMBean(this.server, this.serverObjectName); } catch (final Exception e) { // NOPMD NOCS (IllegalCatchCheck) LOGGER.warn("Unable to register JMXServer MBean", e); } } if (this.controllerObjectName != null) { try { // MXBeans is currently not possible (getClasses in IRecord) final StandardMBean mbean = new StandardMBean(this.monitoringController, IMonitoringController.class); mbs.registerMBean(mbean, this.controllerObjectName); } catch (final Exception e) { // NOPMD NOCS (IllegalCatchCheck) LOGGER.warn("Unable to register Monitoring Controller MBean", e); } } if ((this.server != null) && this.server.isActive()) { this.server.addNotificationListener(this.serverNotificationListener, null, null); } } } }
@Override protected final void init() { synchronized (this) { if (this.jmxEnabled && !this.isTerminated()) { final MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); if (this.serverObjectName != null) { try { mbs.registerMBean(this.server, this.serverObjectName); } catch (final Exception e) { // NOPMD NOCS (IllegalCatchCheck) LOG.warn("Unable to register JMXServer MBean", e); } } if (this.controllerObjectName != null) { try { // MXBeans is currently not possible (getClasses in IRecord) final StandardMBean mbean = new StandardMBean(this.monitoringController, IMonitoringController.class); mbs.registerMBean(mbean, this.controllerObjectName); } catch (final Exception e) { // NOPMD NOCS (IllegalCatchCheck) LOG.warn("Unable to register Monitoring Controller MBean", e); } } if ((this.server != null) && this.server.isActive()) { this.server.addNotificationListener(this.serverNotificationListener, null, null); } } } }