public MutationWriter(int numSendThreads) { serversMutations = new HashMap<>(); queued = new HashSet<>(); sendThreadPool = new SimpleThreadPool(numSendThreads, this.getClass().getName()); locators = new HashMap<>(); binningThreadPool = new SimpleThreadPool(1, "BinMutations", new SynchronousQueue<>()); binningThreadPool.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); }
public MutationWriter(int numSendThreads) { serversMutations = new HashMap<>(); queued = new HashSet<>(); sendThreadPool = new SimpleThreadPool(numSendThreads, this.getClass().getName()); locators = new HashMap<>(); binningThreadPool = new SimpleThreadPool(1, "BinMutations", new SynchronousQueue<Runnable>()); binningThreadPool.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); }