MCPcopy Create free account
hub / github.com/e2wugui/zeze / main

Method main

ZezeJava/ZezeJava/src/main/java/Zeze/Dbh2/Dbh2Manager.java:243–271  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

241 }
242
243 public static void main(String[] args) {
244 try {
245 Task.tryInitThreadPool();
246
247 var selector = 1;
248
249 for (int i = 2; i < args.length; ++i) {
250 //noinspection SwitchStatementWithTooFewBranches,EnhancedSwitchMigration
251 switch (args[i]) {
252 case "-selector":
253 selector = Integer.parseInt(args[++i]);
254 break;
255 default:
256 throw new RuntimeException("unknown option: " + args[i]);
257 }
258 }
259
260 Zeze.Net.Selectors.getInstance().add(selector - 1);
261 ZezeCounter.tryInit();
262
263 var manager = new Dbh2Manager(args[0], args[1]);
264 manager.start();
265 synchronized (Thread.currentThread()) {
266 Thread.currentThread().wait();
267 }
268 } catch (Exception e) {
269 logger.error("", e);
270 }
271 }
272}

Callers

nothing calls this directly

Calls 6

tryInitThreadPoolMethod · 0.95
tryInitMethod · 0.95
startMethod · 0.95
parseIntMethod · 0.80
addMethod · 0.65
getInstanceMethod · 0.45

Tested by

no test coverage detected