@NotNull private ProjectData getProjectData(String projectPath) { synchronized (myProjectDataMap) { ProjectData data = myProjectDataMap.get(projectPath); if (data == null) { data = new ProjectData(new SequentialTaskExecutor(PooledThreadExecutor.INSTANCE)); myProjectDataMap.put(projectPath, data); } return data; } }
private Future<Pair<RequestFuture<PreloadedProcessMessageHandler>, OSProcessHandler>> launchPreloadedBuildProcess(final Project project, SequentialTaskExecutor projectTaskQueue) throws Exception { ensureListening(); // launching build process from projectTaskQueue ensures that no other build process for this project is currently running return projectTaskQueue.submit(new Callable<Pair<RequestFuture<PreloadedProcessMessageHandler>, OSProcessHandler>>() { public Pair<RequestFuture<PreloadedProcessMessageHandler>, OSProcessHandler> call() throws Exception { if (project.isDisposed()) { return null; } final RequestFuture<PreloadedProcessMessageHandler> future = new RequestFuture<PreloadedProcessMessageHandler>(new PreloadedProcessMessageHandler(), UUID.randomUUID(), new CancelBuildSessionAction<PreloadedProcessMessageHandler>()); try { myMessageDispatcher.registerBuildMessageHandler(future, null); final OSProcessHandler processHandler = launchBuildProcess(project, myListenPort, future.getRequestID(), true); final StringBuffer errors = new StringBuffer(); processHandler.addProcessListener(new StdOutputCollector(errors)); STDERR_OUTPUT.set(processHandler, errors); processHandler.startNotify(); return Pair.create(future, processHandler); } catch (Throwable e) { handleProcessExecutionFailure(future.getRequestID(), e); throw e instanceof Exception? (Exception)e : new RuntimeException(e); } } }); }
public JavaBuilder(Executor tasksExecutor) { super(BuilderCategory.TRANSLATOR); myTaskRunner = new SequentialTaskExecutor(tasksExecutor); //add here class processors in the sequence they should be executed }
private ProjectData(@NotNull SequentialTaskExecutor taskQueue) { this.taskQueue = taskQueue; }
public ServerTaskExecutorImpl() { myTaskExecutor = new SequentialTaskExecutor(PooledThreadExecutor.INSTANCE); }
private ProjectData(SequentialTaskExecutor taskQueue) { this.taskQueue = taskQueue; }
public ServerTaskExecutorImpl() { myTaskExecutor = new SequentialTaskExecutor(POOLED_THREAD_EXECUTOR); }
public ServerTaskExecutorImpl() { myTaskExecutor = SequentialTaskExecutor.createSequentialApplicationPoolExecutor("ServerTaskExecutorImpl pool"); }