|
@@ -8,13 +8,15 @@ import com.xxl.job.core.handler.IJobHandler;
|
8
|
8
|
import com.xxl.job.core.log.XxlJobFileAppender;
|
9
|
9
|
import com.xxl.job.core.log.XxlJobLogger;
|
10
|
10
|
import com.xxl.job.core.util.ShardingUtil;
|
11
|
|
-import org.eclipse.jetty.util.ConcurrentHashSet;
|
12
|
11
|
import org.slf4j.Logger;
|
13
|
12
|
import org.slf4j.LoggerFactory;
|
14
|
13
|
|
15
|
14
|
import java.io.PrintWriter;
|
16
|
15
|
import java.io.StringWriter;
|
|
16
|
+import java.util.Collections;
|
17
|
17
|
import java.util.Date;
|
|
18
|
+import java.util.HashSet;
|
|
19
|
+import java.util.Set;
|
18
|
20
|
import java.util.concurrent.LinkedBlockingQueue;
|
19
|
21
|
import java.util.concurrent.TimeUnit;
|
20
|
22
|
|
|
@@ -28,7 +30,7 @@ public class JobThread extends Thread{
|
28
|
30
|
private int jobId;
|
29
|
31
|
private IJobHandler handler;
|
30
|
32
|
private LinkedBlockingQueue<TriggerParam> triggerQueue;
|
31
|
|
- private ConcurrentHashSet<Integer> triggerLogIdSet; // avoid repeat trigger for the same TRIGGER_LOG_ID
|
|
33
|
+ private Set<Integer> triggerLogIdSet; // avoid repeat trigger for the same TRIGGER_LOG_ID
|
32
|
34
|
|
33
|
35
|
private volatile boolean toStop = false;
|
34
|
36
|
private String stopReason;
|
|
@@ -41,7 +43,7 @@ public class JobThread extends Thread{
|
41
|
43
|
this.jobId = jobId;
|
42
|
44
|
this.handler = handler;
|
43
|
45
|
this.triggerQueue = new LinkedBlockingQueue<TriggerParam>();
|
44
|
|
- this.triggerLogIdSet = new ConcurrentHashSet<Integer>();
|
|
46
|
+ this.triggerLogIdSet = Collections.synchronizedSet(new HashSet<Integer>());
|
45
|
47
|
}
|
46
|
48
|
public IJobHandler getHandler() {
|
47
|
49
|
return handler;
|