public static int parseIOThreads(Integer threads){
  final int result=threads == null ? Math.min(Constants.MAX_IO_THREADS,Environment.defaultThreads()) : threads;
  return Math.max(1,result - 1);
}

public static int parseIOThreads ( Integer threads ) { final int result = threads == null ? Math . min ( Constants . MAX_IO_THREADS , Environment . defaultThreads ( ) ) : threads ; return Math . max ( 1 , result - 1 ) ; }
returns number of i / o threads from a threads parameter ( where 1 thread is reserved for main processing ) . the total number of threads is user supplied , otherwise the minimum of the number of available processors and constants . max_threads .
