use of com.linkedin.parseq.EngineBuilder in project rest.li by linkedin.
the class TestParSeqRestClient method setUp.
@SuppressWarnings("deprecation")
@BeforeClass
public void setUp() throws Exception {
super.init();
final int numCores = Runtime.getRuntime().availableProcessors();
_scheduler = Executors.newScheduledThreadPool(numCores + 1);
_engine = new EngineBuilder().setTaskExecutor(_scheduler).setTimerScheduler(_scheduler).build();
_restClient = new ParSeqRestClient(getClient());
}
use of com.linkedin.parseq.EngineBuilder in project rest.li by linkedin.
the class RestLiIntTestServer method main.
public static void main(String[] args) throws IOException {
final int numCores = Runtime.getRuntime().availableProcessors();
final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(numCores + 1);
final Engine engine = new EngineBuilder().setTaskExecutor(scheduler).setTimerScheduler(scheduler).build();
HttpServer server = createServer(engine, DEFAULT_PORT, supportedCompression);
server.start();
System.out.println("HttpServer running on port " + DEFAULT_PORT + ". Press any key to stop server");
System.in.read();
server.stop();
engine.shutdown();
}
Aggregations