(@NotNull BIndex index, @NotNull String timerId, @NotNull String cron, long times, long endTime, int missfirePolicy, @NotNull Class<? extends TimerHandle> handleClass, @Nullable Bean customData, @NotNull String oneByOneKey)
| 705 | } |
| 706 | |
| 707 | public boolean cronEquals(@NotNull BIndex index, @NotNull String timerId, @NotNull String cron, long times, |
| 708 | long endTime, int missfirePolicy, @NotNull Class<? extends TimerHandle> handleClass, |
| 709 | @Nullable Bean customData, @NotNull String oneByOneKey) { |
| 710 | if (timerFutures.containsKey(timerId)) { // 在调度中 |
| 711 | var root = _tNodeRoot.get(zeze.getConfig().getServerId()); |
| 712 | if (root != null) { |
| 713 | var node = _tNodes.get(index.getNodeId()); |
| 714 | if (node != null) { |
| 715 | var timer = node.getTimers().get(timerId); |
| 716 | if (timer != null |
| 717 | && timer.getHandleName().equals(handleClass.getName()) |
| 718 | && timer.getCustomData().getBean().equals(customData)) { |
| 719 | var timerObj = timer.getTimerObj().getBean(); |
| 720 | if (timerObj instanceof BCronTimer) { |
| 721 | var cronTimer = (BCronTimer)timerObj; |
| 722 | return cronTimer.getCronExpression().equals(cron) |
| 723 | && cronTimer.getRemainTimes() == times |
| 724 | && cronTimer.getEndTime() == endTime |
| 725 | && cronTimer.getMissfirePolicy() == missfirePolicy |
| 726 | && cronTimer.getOneByOneKey().equals(oneByOneKey); |
| 727 | } |
| 728 | } |
| 729 | } |
| 730 | } |
| 731 | } |
| 732 | return false; |
| 733 | } |
| 734 | |
| 735 | /** |
| 736 | * 取消一个具体的Timer实例。 |
no test coverage detected