weniger static
This commit is contained in:
parent
2dd8cc4f39
commit
cb37a78d60
@ -8,11 +8,16 @@ import java.util.concurrent.*;
|
||||
public class KlausurenServer {
|
||||
|
||||
private ConcurrentMap<String, TreeSet<Integer>> data = new ConcurrentHashMap<>();
|
||||
private static ExecutorService executorService = Executors.newCachedThreadPool();
|
||||
private static ServerSocket serverSocket;
|
||||
private ExecutorService executorService = Executors.newCachedThreadPool();
|
||||
private ServerSocket serverSocket;
|
||||
|
||||
private static Map<String, CommandHandler> commands = new HashMap<>();
|
||||
|
||||
|
||||
static Map<String, CommandHandler> getCommands() {
|
||||
return commands;
|
||||
}
|
||||
|
||||
private boolean running;
|
||||
|
||||
public KlausurenServer(int port) {
|
||||
@ -50,9 +55,8 @@ public class KlausurenServer {
|
||||
|
||||
set.forEach((key, value) -> set.forEach((s, integers) -> {
|
||||
if(!value.equals(integers)) {
|
||||
if (integers.containsAll(value)) {
|
||||
if (integers.containsAll(value))
|
||||
set.remove(key);
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
@ -159,10 +163,6 @@ public class KlausurenServer {
|
||||
}
|
||||
}
|
||||
|
||||
static Map<String, CommandHandler> getCommands() {
|
||||
return commands;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
new KlausurenServer(Integer.parseInt(args[0]));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user