本文整理了Java中ch.qos.logback.core.util.Duration.<init>()
方法的一些代码示例,展示了Duration.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Duration.<init>()
方法的具体详情如下:
包路径:ch.qos.logback.core.util.Duration
类名称:Duration
方法名:<init>
暂无
代码示例来源:origin: camunda/camunda-bpm-platform
public static Duration buildByMilliseconds(double value) {
return new Duration((long) (value));
}
代码示例来源:origin: camunda/camunda-bpm-platform
public static Duration buildBySeconds(double value) {
return new Duration((long) (SECONDS_COEFFICIENT * value));
}
代码示例来源:origin: camunda/camunda-bpm-platform
public static Duration buildByDays(double value) {
return new Duration((long) (DAYS_COEFFICIENT * value));
}
代码示例来源:origin: camunda/camunda-bpm-platform
public static Duration buildByHours(double value) {
return new Duration((long) (HOURS_COEFFICIENT * value));
}
代码示例来源:origin: camunda/camunda-bpm-platform
public static Duration buildUnbounded() {
return new Duration(Long.MAX_VALUE);
}
代码示例来源:origin: camunda/camunda-bpm-platform
public static Duration buildByMinutes(double value) {
return new Duration((long) (MINUTES_COEFFICIENT * value));
}
代码示例来源:origin: tony19/logback-android
public static Duration buildByMilliseconds(double value) {
return new Duration((long) (value));
}
代码示例来源:origin: tony19/logback-android
public static Duration buildUnbounded() {
return new Duration(Long.MAX_VALUE);
}
代码示例来源:origin: tony19/logback-android
public static Duration buildByMinutes(double value) {
return new Duration((long) (MINUTES_COEFFICIENT * value));
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/ch.qos.logback.core
public static Duration buildByDays(double value) {
return new Duration((long) (DAYS_COEFFICIENT * value));
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/ch.qos.logback.core
public static Duration buildUnbounded() {
return new Duration(Long.MAX_VALUE);
}
代码示例来源:origin: com.alibaba.citrus.tool/antx-autoexpand
public static Duration buildUnbounded() {
return new Duration(Long.MAX_VALUE);
}
代码示例来源:origin: com.hynnet/logback-core
public static Duration buildBySeconds(double value) {
return new Duration((long) (SECONDS_COEFFICIENT * value));
}
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
public static Duration buildByMilliseconds(double value) {
return new Duration((long) (value));
}
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
public static Duration buildByMinutes(double value) {
return new Duration((long) (MINUTES_COEFFICIENT * value));
}
代码示例来源:origin: Nextdoor/bender
public static Duration buildByMinutes(double value) {
return new Duration((long) (MINUTES_COEFFICIENT * value));
}
代码示例来源:origin: tony19/logback-android
public static Duration buildByHours(double value) {
return new Duration((long) (HOURS_COEFFICIENT * value));
}
代码示例来源:origin: tony19/logback-android
public static Duration buildByDays(double value) {
return new Duration((long) (DAYS_COEFFICIENT * value));
}
代码示例来源:origin: tony19/logback-android
@Test
public void addsInfoMessageWhenEventCouldNotBeQueuedInConfiguredTimeoutDueToQueueSizeLimitation() throws Exception {
// given
long eventDelayLimit = 42;
doReturn(false).when(deque).offer("some event", eventDelayLimit, TimeUnit.MILLISECONDS);
appender.setEventDelayLimit(new Duration(eventDelayLimit));
appender.start();
// when
appender.append("some event");
// then
verify(appender).addInfo("Dropping event due to timeout limit of [" + eventDelayLimit + " milliseconds] being exceeded");
}
代码示例来源:origin: tony19/logback-android
@Test
public void createsSocketConnectorWithConfiguredParameters() throws Exception {
// given
appender.setReconnectionDelay(new Duration(42));
appender.setRemoteHost("localhost");
appender.setPort(21);
// when
appender.start();
// then
verify(appender, timeout(TIMEOUT)).newConnector(InetAddress.getByName("localhost"), 21, 0, 42);
}
内容来源于网络,如有侵权,请联系作者删除!