package server;


import static spark.Spark.init;
import static spark.Spark.port;
import static spark.Spark.threadPool;
import static spark.Spark.webSocket;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
 * Created by rohitv on 09/03/17.
 */
public class SparkServer {
	  public static final Logger logger = LoggerFactory.getLogger(SparkServer.class);
	  public static final int PORT=8080;
	  public static final int THREADS=Runtime.getRuntime().availableProcessors();
    public static void main(String[] args) {
        threadPool(THREADS);
        port(PORT);
        webSocket("/", EchoWebSocket.class);
				logger.info("==> starting echo server at port:"+PORT + " with threadpool size:"+ THREADS);
			  init();
    }
}

@@ -428,16 +428,20 @@
 int 
+MIN_
 THREADS=
 Runt
@@ -440,50 +440,107 @@
 ADS=
-Runtime.getRuntime().availableProcessors()
+6;%0A%09  public static final int MAX_THREADS=8;%0A%09  public static final int THREAD_POOL_TIMEOUT = 30000
 ;%0A  
@@ -590,16 +590,18 @@
         
+//
 threadPo
@@ -603,23 +603,60 @@
 eadPool(
+MAX_
 THREADS
+, MIN_THREADS,THREAD_POOL_TIMEOUT
 );%0A     
@@ -775,44 +775,8 @@
 PORT
- + %22 with threadpool size:%22+ THREADS
 );%0A%09

use default thread pool size