本文整理了Java中com.google.common.util.concurrent.AbstractFuture.afterDone()
方法的一些代码示例,展示了AbstractFuture.afterDone()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AbstractFuture.afterDone()
方法的具体详情如下:
包路径:com.google.common.util.concurrent.AbstractFuture
类名称:AbstractFuture
方法名:afterDone
[英]Callback method that is called exactly once after the future is completed.
If #interruptTask is also run during completion, #afterDone runs after it.
The default implementation of this method in AbstractFuture does nothing. This is intended for very lightweight cleanup work, for example, timing statistics or clearing fields. If your task does anything heavier consider, just using a listener with an executor.
[中]在将来完成后只调用一次的回调方法。
如果#interruptTask在完成期间也运行,则#afterDone将在完成后运行。
此方法在AbstractFuture中的默认实现不起任何作用。这是用于非常轻量级的清理工作,例如,计时统计或清除字段。如果你的任务有更重的考虑,只需使用一个执行器的侦听器。
代码示例来源:origin: google/guava
future.afterDone();
代码示例来源:origin: google/j2objc
future.afterDone();
代码示例来源:origin: wildfly/wildfly
future.afterDone();
代码示例来源:origin: org.jboss.eap/wildfly-client-all
future.afterDone();
代码示例来源:origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger
future.afterDone();
内容来源于网络,如有侵权,请联系作者删除!