From 2ff11b5d3b0b0fb154a19c89501d0272daeaa784 Mon Sep 17 00:00:00 2001 From: "xueli.xue" Date: Thu, 29 Oct 2020 21:47:57 +0800 Subject: [PATCH] =?UTF-8?q?-=2019=E3=80=81[ING]=E4=BB=BB=E5=8A=A1=E8=A7=A6?= =?UTF-8?q?=E5=8F=91=E5=8F=82=E6=95=B0=E4=BC=98=E5=8C=96=EF=BC=9A=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E9=80=89=E6=8B=A9=20"Cron=E8=A7=A6=E5=8F=91"=E3=80=81?= =?UTF-8?q?"=E5=9B=BA=E5=AE=9A=E9=97=B4=E9=9A=94=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E8=A7=A6=E5=8F=91"=E3=80=81"=E6=8C=87=E5=AE=9A=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E7=82=B9=E8=A7=A6=E5=8F=91"=E3=80=81"=E4=B8=8D?= =?UTF-8?q?=E9=80=89=E6=8B=A9"=20=E7=AD=89=EF=BC=9B=20-=2020=E3=80=81[ING]?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=20misfire=20=E7=AD=96=E7=95=A5=EF=BC=9A?= =?UTF-8?q?=E5=BF=BD=E7=95=A5=E3=80=81=E8=A1=A5=E5=81=BF=E4=B8=80=E6=AC=A1?= =?UTF-8?q?=E3=80=81=E8=A1=A5=E5=81=BF=E6=9C=80=E8=BF=9110=E6=AC=A1?= =?UTF-8?q?=E2=80=A6=E2=80=A6=E7=AD=89=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../job/admin/core/scheduler/MisfireStrategyEnum.java | 9 ++++++++- .../xxl/job/admin/core/scheduler/ScheduleTypeEnum.java | 9 +++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/xxl-job-admin/src/main/java/com/xxl/job/admin/core/scheduler/MisfireStrategyEnum.java b/xxl-job-admin/src/main/java/com/xxl/job/admin/core/scheduler/MisfireStrategyEnum.java index 5e3ee0ba..47cc0e05 100644 --- a/xxl-job-admin/src/main/java/com/xxl/job/admin/core/scheduler/MisfireStrategyEnum.java +++ b/xxl-job-admin/src/main/java/com/xxl/job/admin/core/scheduler/MisfireStrategyEnum.java @@ -15,6 +15,13 @@ public enum MisfireStrategyEnum { */ FIRE_ONCE_NOW; - private int value; + public static MisfireStrategyEnum match(String name){ + for (MisfireStrategyEnum item: MisfireStrategyEnum.values()) { + if (item.name().equals(name)) { + return item; + } + } + return DO_NOTHING; + } } diff --git a/xxl-job-admin/src/main/java/com/xxl/job/admin/core/scheduler/ScheduleTypeEnum.java b/xxl-job-admin/src/main/java/com/xxl/job/admin/core/scheduler/ScheduleTypeEnum.java index d0b53f78..d38b2ca2 100644 --- a/xxl-job-admin/src/main/java/com/xxl/job/admin/core/scheduler/ScheduleTypeEnum.java +++ b/xxl-job-admin/src/main/java/com/xxl/job/admin/core/scheduler/ScheduleTypeEnum.java @@ -22,4 +22,13 @@ public enum ScheduleTypeEnum { */ FIX_DELAY; + public static ScheduleTypeEnum match(String name){ + for (ScheduleTypeEnum item: ScheduleTypeEnum.values()) { + if (item.equals(name)) { + return item; + } + } + return NONE; + } + }