<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # 組件源碼 ``` @InParams(param = { @Param(name = "future", comment = "future", type = Future.class), @Param(name = "timeoutInSecs", comment = "超時時間(秒)", type = int.class) }) @OutParams(param = { @Param(name = "data", comment = "數據", type = Object.class) }) @Returns(returns = { @Return(id = "-1", desp = "異常"), @Return(id = "0", desp = "失敗"), @Return(id = "1", desp = "成功") }) @Component(label = "從異步組件中獲取數據", style = "判斷型", type = "同步組件", comment = "當Future已經完成時立即返回結果, 否則同步阻塞直到超時或者Future完成。當超時時間小于等于0時,超時時間為Future的超時時間", version = "1.0.0", deprecated = false, date = "Fri Jul 17 15:28:00 CST 2018") public static ResultBase P_getDataFromFuture(Object future, int timeoutInSecs) { if (!(future instanceof Future)) { return ResultBase.newFailureResult("TPTK0004", "參數必須是future類型"); } else { try { Object data; if (timeoutInSecs <= 0) { timeoutInSecs = 60; } data = ((Future) future).get((long) timeoutInSecs, TimeUnit.SECONDS); return ResultBase.newSuccessResult(new Object[] { data }); } catch (ExecutionException arg3) { return ResultBase.newExceptionResult("TPTK0005", "線程執行異常:" + arg3); } catch (InterruptedException arg4) { return ResultBase.newExceptionResult("TPTK0006", "線程wait被中斷:" + arg4); } catch (TimeoutException arg5) { return ResultBase.newExceptionResult("TPTK0007", "等待時間超時:" + arg5); } } } ``` # 交易中組件使用方式 ![](https://img.kancloud.cn/8d/f5/8df5447e1804658139e1cda132638cc9_1870x892.png) # 參數說明及示例 ## 入口參數 future:Future 類型的參數,示例: `__INNER__["future"]` 超時時間(秒):指定時間內完成,示例: `2` ## 出口參數 數據:從異步組件中獲取數據,示例: `__INNER__["result"]` > 異步組件要自己寫。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看