MatchService.java
577 Bytes
package com.bsth.vehicle.gpsdata.arrival;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
public class MatchService {
static MatchService bs;
static ThreadPoolExecutor pool = new ThreadPoolExecutor(2, 20, 1, TimeUnit.SECONDS,
new ArrayBlockingQueue<Runnable>(3));
/**
*
* @Title: addService
* @Description: TODO(添加一个任务)
* @throws
*/
public static void addService(String lineCode) {
pool.execute(new ThreadPoolTask(lineCode));
}
}