@Test public void simpleMainLike() throws Exception { try (QueryServer queryServer = Configs.newDefault(QueryServer.class)) { queryServer.run(); } }
@VisibleForTesting void run() throws InterruptedException { for (EventExecutor executor : executorGroup) { executor.execute(new NextQueryTask(queryQueue, executor)); } serverBootstrap.bind().sync(); }
QueryServer implements AutoCloseable { @VisibleForTesting void run() throws InterruptedException { for (EventExecutor executor : executorGroup) { executor.execute(new NextQueryTask(queryQueue, executor)); } serverBootstrap.bind().sync(); } }
QueryServer implements AutoCloseable { @VisibleForTesting void run() throws InterruptedException { for (EventExecutor executor : executorGroup) { executor.execute(new NextQueryTask(queryQueue, executor)); } serverBootstrap.bind().sync(); } @JsonCreator private  QueryServer(@JsonProperty(value = "webPort", required = true) int webPort,
                        @JsonProperty(value = "queryThreads", required = true) int queryThreads,
                        @JsonProperty(value = "queryThreadFactory", required = true) ThreadFactory queryThreadFactory
    ); }
QueryServer implements AutoCloseable { @VisibleForTesting void run() throws InterruptedException { for (EventExecutor executor : executorGroup) { executor.execute(new NextQueryTask(queryQueue, executor)); } serverBootstrap.bind().sync(); } @JsonCreator private  QueryServer(@JsonProperty(value = "webPort", required = true) int webPort,
                        @JsonProperty(value = "queryThreads", required = true) int queryThreads,
                        @JsonProperty(value = "queryThreadFactory", required = true) ThreadFactory queryThreadFactory
    ); static void main(String[] args); @Override void close(); }
QueryServer implements AutoCloseable { @VisibleForTesting void run() throws InterruptedException { for (EventExecutor executor : executorGroup) { executor.execute(new NextQueryTask(queryQueue, executor)); } serverBootstrap.bind().sync(); } @JsonCreator private  QueryServer(@JsonProperty(value = "webPort", required = true) int webPort,
                        @JsonProperty(value = "queryThreads", required = true) int queryThreads,
                        @JsonProperty(value = "queryThreadFactory", required = true) ThreadFactory queryThreadFactory
    ); static void main(String[] args); @Override void close();  }