[refactoring][minor] Replaced all tabs with four spaces.

This commit is contained in:
North 2012-06-19 23:50:20 +03:00
parent e646e4768d
commit 239a4fb100
2891 changed files with 79411 additions and 79411 deletions

View file

@ -36,37 +36,37 @@ import java.util.concurrent.*;
*/
public class ThreadExecutor {
private static final ExecutorService callExecutor = Executors.newCachedThreadPool();
private static final ExecutorService gameExecutor = Executors.newFixedThreadPool(ConfigSettings.getInstance().getMaxGameThreads());
private static final ScheduledExecutorService timeoutExecutor = Executors.newScheduledThreadPool(5);
private static final ExecutorService callExecutor = Executors.newCachedThreadPool();
private static final ExecutorService gameExecutor = Executors.newFixedThreadPool(ConfigSettings.getInstance().getMaxGameThreads());
private static final ScheduledExecutorService timeoutExecutor = Executors.newScheduledThreadPool(5);
static {
((ThreadPoolExecutor)callExecutor).setKeepAliveTime(60, TimeUnit.SECONDS);
((ThreadPoolExecutor)callExecutor).allowCoreThreadTimeOut(true);
((ThreadPoolExecutor)gameExecutor).setKeepAliveTime(60, TimeUnit.SECONDS);
((ThreadPoolExecutor)gameExecutor).allowCoreThreadTimeOut(true);
((ThreadPoolExecutor)timeoutExecutor).setKeepAliveTime(60, TimeUnit.SECONDS);
((ThreadPoolExecutor)timeoutExecutor).allowCoreThreadTimeOut(true);
}
static {
((ThreadPoolExecutor)callExecutor).setKeepAliveTime(60, TimeUnit.SECONDS);
((ThreadPoolExecutor)callExecutor).allowCoreThreadTimeOut(true);
((ThreadPoolExecutor)gameExecutor).setKeepAliveTime(60, TimeUnit.SECONDS);
((ThreadPoolExecutor)gameExecutor).allowCoreThreadTimeOut(true);
((ThreadPoolExecutor)timeoutExecutor).setKeepAliveTime(60, TimeUnit.SECONDS);
((ThreadPoolExecutor)timeoutExecutor).allowCoreThreadTimeOut(true);
}
private final static ThreadExecutor INSTANCE = new ThreadExecutor();
private final static ThreadExecutor INSTANCE = new ThreadExecutor();
public static ThreadExecutor getInstance() {
return INSTANCE;
}
public static ThreadExecutor getInstance() {
return INSTANCE;
}
private ThreadExecutor() {}
private ThreadExecutor() {}
public ExecutorService getCallExecutor() {
return callExecutor;
}
public ExecutorService getCallExecutor() {
return callExecutor;
}
public ExecutorService getGameExecutor() {
return gameExecutor;
}
public ExecutorService getGameExecutor() {
return gameExecutor;
}
public ScheduledExecutorService getTimeoutExecutor() {
return timeoutExecutor;
}
public ScheduledExecutorService getTimeoutExecutor() {
return timeoutExecutor;
}
}