public void run() {
if(true){
init(); //init()用于得到fdfs-client.properties文件中的一些参数
//logger.info("coresize:"+coresize+",maxsize:"+maxsize+",queuesize:"+queuesize);
LinkedBlockingQueue<Runnable> queue = new LinkedBlockingQueue<Runnable>(queuesize);
// exe = Executors.newFixedThreadPool(maxsize);
ThreadPoolExecutor executor = new ThreadPoolExecutor(
coresize,
maxsize,
5000L,
TimeUnit.MICROSECONDS,
queue,
new RejectedExecutionReputHandler());
while (true) {
try {
// executor.submit(new FastDFSLoadTask());
// Thread.sleep(5000);
FastDFSLoadTask task= new FastDFSLoadTask();
task.call();
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
if(true){
init(); //init()用于得到fdfs-client.properties文件中的一些参数
//logger.info("coresize:"+coresize+",maxsize:"+maxsize+",queuesize:"+queuesize);
LinkedBlockingQueue<Runnable> queue = new LinkedBlockingQueue<Runnable>(queuesize);
// exe = Executors.newFixedThreadPool(maxsize);
ThreadPoolExecutor executor = new ThreadPoolExecutor(
coresize,
maxsize,
5000L,
TimeUnit.MICROSECONDS,
queue,
new RejectedExecutionReputHandler());
while (true) {
try {
// executor.submit(new FastDFSLoadTask());
// Thread.sleep(5000);
FastDFSLoadTask task= new FastDFSLoadTask();
task.call();
} catch (Exception e) {
e.printStackTrace();
}
}
}
}