|
@@ -24,6 +24,7 @@ import org.slf4j.LoggerFactory;
|
24
|
24
|
|
25
|
25
|
import java.util.*;
|
26
|
26
|
import java.util.concurrent.ConcurrentHashMap;
|
|
27
|
+import java.util.concurrent.ConcurrentMap;
|
27
|
28
|
|
28
|
29
|
/**
|
29
|
30
|
* Created by xuxueli on 2016/3/2 21:14.
|
|
@@ -223,7 +224,7 @@ public class XxlJobExecutor {
|
223
|
224
|
|
224
|
225
|
|
225
|
226
|
// ---------------------- job handler repository ----------------------
|
226
|
|
- private static ConcurrentHashMap<String, IJobHandler> jobHandlerRepository = new ConcurrentHashMap<String, IJobHandler>();
|
|
227
|
+ private static ConcurrentMap<String, IJobHandler> jobHandlerRepository = new ConcurrentHashMap<String, IJobHandler>();
|
227
|
228
|
public static IJobHandler registJobHandler(String name, IJobHandler jobHandler){
|
228
|
229
|
logger.info(">>>>>>>>>>> xxl-job register jobhandler success, name:{}, jobHandler:{}", name, jobHandler);
|
229
|
230
|
return jobHandlerRepository.put(name, jobHandler);
|
|
@@ -234,7 +235,7 @@ public class XxlJobExecutor {
|
234
|
235
|
|
235
|
236
|
|
236
|
237
|
// ---------------------- job thread repository ----------------------
|
237
|
|
- private static ConcurrentHashMap<Integer, JobThread> jobThreadRepository = new ConcurrentHashMap<Integer, JobThread>();
|
|
238
|
+ private static ConcurrentMap<Integer, JobThread> jobThreadRepository = new ConcurrentHashMap<Integer, JobThread>();
|
238
|
239
|
public static JobThread registJobThread(int jobId, IJobHandler handler, String removeOldReason){
|
239
|
240
|
JobThread newJobThread = new JobThread(jobId, handler);
|
240
|
241
|
newJobThread.start();
|