public void waitForServiceUp() { Integer timeout = getConfig(BrooklynConfigKeys.START_TIMEOUT); waitForServiceUp(timeout, TimeUnit.SECONDS); } public void waitForServiceUp(Duration duration) {
protected void callRebindHooks() { connectSensors(); waitForServiceUp(); }
public void waitForServiceUp(TimeDuration duration) { waitForServiceUp(duration.toMilliseconds(), TimeUnit.MILLISECONDS); } public void waitForServiceUp(long duration, TimeUnit units) {
public void waitForServiceUp(Duration duration) { waitForServiceUp(duration.toMilliseconds(), TimeUnit.MILLISECONDS); } public void waitForServiceUp(TimeDuration duration) {
@Override public void waitForServiceUp(long duration, TimeUnit units) { super.waitForServiceUp(duration, units); if (((JavaSoftwareProcessDriver)getDriver()).isJmxEnabled()) { // Wait for the MBean to exist JmxHelper helper = new JmxHelper(this); try { helper.assertMBeanExistsEventually(ZOOKEEPER_MBEAN, units.toMillis(duration)); } finally { helper.disconnect(); } } }
@Override public void waitForServiceUp(long duration, TimeUnit units) { super.waitForServiceUp(duration, units); if (((KafkaBrokerDriver)getDriver()).isJmxEnabled()) { // Wait for the MBean to exist JmxHelper helper = new JmxHelper(this); try { helper.assertMBeanExistsEventually(SOCKET_SERVER_STATS_MBEAN, units.toMillis(duration)); } finally { helper.disconnect(); } } }
@Override protected void postStartCustom() { entity().postDriverStart(); if (entity().connectedSensors) { // many impls aren't idempotent - though they should be! log.debug("skipping connecting sensors for "+entity()+" in driver-tasks postStartCustom because already connected (e.g. restarting)"); } else { log.debug("connecting sensors for "+entity()+" in driver-tasks postStartCustom because already connected (e.g. restarting)"); entity().connectSensors(); } entity().waitForServiceUp(); entity().postStart(); }