[app-wiring-refactor]: Apply review comments:

- Add reference to original library in `FluentBuilder`.
- Change `I<Name>` notation to `<Name>Impl` notation.
- Move error config to test resources
- Add comment with config instruction
- Add config to the documentation
This commit is contained in:
Francesco Burato 2020-10-30 22:37:25 +00:00
parent e8bb8ae24b
commit 6e3750d50a
41 changed files with 171 additions and 146 deletions

View file

@ -1,13 +1,13 @@
package mage.server.util;
import mage.server.managers.IConfigSettings;
import mage.server.managers.ConfigSettings;
import mage.server.util.config.Config;
import mage.server.util.config.GamePlugin;
import mage.server.util.config.Plugin;
import java.util.List;
public class ConfigWrapper implements IConfigSettings {
public class ConfigWrapper implements ConfigSettings {
private final Config config;

View file

@ -1,14 +1,14 @@
package mage.server.util;
import mage.server.managers.IConfigSettings;
import mage.server.managers.IThreadExecutor;
import mage.server.managers.ConfigSettings;
import mage.server.managers.ThreadExecutor;
import java.util.concurrent.*;
/**
* @author BetaSteward_at_googlemail.com
*/
public class ThreadExecutor implements IThreadExecutor {
public class ThreadExecutorImpl implements ThreadExecutor {
private final ExecutorService callExecutor;
private final ExecutorService gameExecutor;
private final ScheduledExecutorService timeoutExecutor;
@ -25,7 +25,7 @@ public class ThreadExecutor implements IThreadExecutor {
* resource consuming process.
*/
public ThreadExecutor(IConfigSettings config) {
public ThreadExecutorImpl(ConfigSettings config) {
callExecutor = Executors.newCachedThreadPool();
gameExecutor = Executors.newFixedThreadPool(config.getMaxGameThreads());
timeoutExecutor = Executors.newScheduledThreadPool(4);