You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "zonghaishang (GitHub)" <gi...@apache.org> on 2018/10/31 14:35:53 UTC
[GitHub] [incubator-dubbo] zonghaishang commented on issue #2686: 重构 ServiceBean 的 isDelay 方法,使其更符合语义
What if you want to expose the service 10 seconds after the spring container started ?
The original intention `delay = 10000` represents execution after 10 seconds.
@beiwei30 @code4wt @chickenlj please help check that.
```java
public synchronized void export() {
if (delay != null && delay > 0) {
//
delayExportExecutor.schedule(new Runnable() {
@Override
public void run() {
doExport();
}
}, delay, TimeUnit.MILLISECONDS);
} else {
doExport();
}
}
```
[ Full content available at: https://github.com/apache/incubator-dubbo/pull/2686 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org