(String[] args)
| 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 | } |
nothing calls this directly
no test coverage detected