@Override public Duration apply(final Object input) { return brooklyn.util.time.Duration.of(input); } });
private static Duration toDuration(Object duration, Duration defaultVal) { if (duration == null) return defaultVal; else return Duration.of(duration); }
private static Duration toDuration(Object duration) { return Duration.of(duration); }
public Builder period(long val, TimeUnit units) { return period(Duration.of(val, units)); } public Builder poll(HttpPollConfig<?> config) {
/** see {@link #rollup(Duration)} */ public Builder rollup(int windowSize, TimeUnit unit) { return rollup(Duration.of(windowSize, unit)); }
public Builder period(int amount, TimeUnit unit) { return period(Duration.of(amount, unit)); }
public Repeater every(groovy.time.Duration duration) { return every(Duration.of(duration)); }
@Override public void waitForServiceUp() { // Increases wait-time by overriding this LOG.info("Waiting for {} up, via {}", this, jmxFeed == null ? "isRunning()" : jmxFeed.getJmxUri()); waitForServiceUp(Duration.of(getConfig(TomcatServer.START_TIMEOUT), TimeUnit.SECONDS)); }
@Override public void waitForServiceUp() { // Increases wait-time by overriding this log.info("Waiting for {} up, via {}", this, jmxFeedJetty == null ? "" : jmxFeedJetty.getJmxUri()); waitForServiceUp(Duration.of(getConfig(TomcatServer.START_TIMEOUT), TimeUnit.SECONDS)); }