Java 类org.gradle.api.execution.TaskExecutionListener 实例源码

项目:Reer    文件:DefaultTaskGraphExecuter.java   
public DefaultTaskGraphExecuter(ListenerManager listenerManager, TaskPlanExecutor taskPlanExecutor, Factory<? extends TaskExecuter> taskExecuter, BuildCancellationToken cancellationToken, BuildOperationExecutor buildOperationExecutor) {
    this.taskPlanExecutor = taskPlanExecutor;
    this.taskExecuter = taskExecuter;
    this.buildOperationExecutor = buildOperationExecutor;
    graphListeners = listenerManager.createAnonymousBroadcaster(TaskExecutionGraphListener.class);
    taskListeners = listenerManager.createAnonymousBroadcaster(TaskExecutionListener.class);
    internalTaskListener = listenerManager.getBroadcaster(InternalTaskExecutionListener.class);
    taskExecutionPlan = new DefaultTaskExecutionPlan(cancellationToken);
}
项目:Pushjet-Android    文件:ParallelTaskPlanExecutor.java   
public void process(final TaskExecutionPlan taskExecutionPlan, final TaskExecutionListener taskListener) {
    StoppableExecutor executor = executorFactory.create("Task worker");
    try {
        startAdditionalWorkers(taskExecutionPlan, taskListener, executor);
        taskWorker(taskExecutionPlan, taskListener).run();
        taskExecutionPlan.awaitCompletion();
    } finally {
        executor.stop();
    }
}
项目:Pushjet-Android    文件:ParallelTaskPlanExecutor.java   
private void startAdditionalWorkers(TaskExecutionPlan taskExecutionPlan, TaskExecutionListener taskListener, Executor executor) {
    List<Project> projects = getAllProjects(taskExecutionPlan);
    int numExecutors = Math.min(executorCount, projects.size());

    LOGGER.info("Using {} parallel executor threads", numExecutors);

    for (int i = 1; i < numExecutors; i++) {
        Runnable worker = taskWorker(taskExecutionPlan, taskListener);
        executor.execute(worker);
    }
}
项目:Pushjet-Android    文件:ParallelTaskPlanExecutor.java   
public void process(final TaskExecutionPlan taskExecutionPlan, final TaskExecutionListener taskListener) {
    StoppableExecutor executor = executorFactory.create("Task worker");
    try {
        startAdditionalWorkers(taskExecutionPlan, taskListener, executor);
        taskWorker(taskExecutionPlan, taskListener).run();
        taskExecutionPlan.awaitCompletion();
    } finally {
        executor.stop();
    }
}
项目:Pushjet-Android    文件:ParallelTaskPlanExecutor.java   
private void startAdditionalWorkers(TaskExecutionPlan taskExecutionPlan, TaskExecutionListener taskListener, Executor executor) {
    List<Project> projects = getAllProjects(taskExecutionPlan);
    int numExecutors = Math.min(executorCount, projects.size());

    LOGGER.info("Using {} parallel executor threads", numExecutors);

    for (int i = 1; i < numExecutors; i++) {
        Runnable worker = taskWorker(taskExecutionPlan, taskListener);
        executor.execute(worker);
    }
}
项目:Reer    文件:DefaultTaskGraphExecuter.java   
public void addTaskExecutionListener(TaskExecutionListener listener) {
    taskListeners.add(listener);
}
项目:Reer    文件:DefaultTaskGraphExecuter.java   
public void removeTaskExecutionListener(TaskExecutionListener listener) {
    taskListeners.remove(listener);
}
项目:Pushjet-Android    文件:DefaultTaskPlanExecutor.java   
public void process(final TaskExecutionPlan taskExecutionPlan, final TaskExecutionListener taskListener) {
    taskWorker(taskExecutionPlan, taskListener).run();
    taskExecutionPlan.awaitCompletion();
}
项目:Pushjet-Android    文件:AbstractTaskPlanExecutor.java   
protected Runnable taskWorker(TaskExecutionPlan taskExecutionPlan, TaskExecutionListener taskListener) {
    return new TaskExecutorWorker(taskExecutionPlan, taskListener);
}
项目:Pushjet-Android    文件:AbstractTaskPlanExecutor.java   
private TaskExecutorWorker(TaskExecutionPlan taskExecutionPlan, TaskExecutionListener taskListener) {
    this.taskExecutionPlan = taskExecutionPlan;
    this.taskListener = taskListener;
}
项目:Pushjet-Android    文件:DefaultTaskGraphExecuter.java   
public DefaultTaskGraphExecuter(ListenerManager listenerManager, TaskPlanExecutor taskPlanExecutor, BuildCancellationToken cancellationToken) {
    this.taskPlanExecutor = taskPlanExecutor;
    graphListeners = listenerManager.createAnonymousBroadcaster(TaskExecutionGraphListener.class);
    taskListeners = listenerManager.createAnonymousBroadcaster(TaskExecutionListener.class);
    taskExecutionPlan = new DefaultTaskExecutionPlan(cancellationToken);
}
项目:Pushjet-Android    文件:DefaultTaskGraphExecuter.java   
public void addTaskExecutionListener(TaskExecutionListener listener) {
    taskListeners.add(listener);
}
项目:Pushjet-Android    文件:DefaultTaskGraphExecuter.java   
public void removeTaskExecutionListener(TaskExecutionListener listener) {
    taskListeners.remove(listener);
}
项目:Pushjet-Android    文件:DefaultTaskPlanExecutor.java   
public void process(final TaskExecutionPlan taskExecutionPlan, final TaskExecutionListener taskListener) {
    taskWorker(taskExecutionPlan, taskListener).run();
    taskExecutionPlan.awaitCompletion();
}
项目:Pushjet-Android    文件:AbstractTaskPlanExecutor.java   
protected Runnable taskWorker(TaskExecutionPlan taskExecutionPlan, TaskExecutionListener taskListener) {
    return new TaskExecutorWorker(taskExecutionPlan, taskListener);
}
项目:Pushjet-Android    文件:AbstractTaskPlanExecutor.java   
private TaskExecutorWorker(TaskExecutionPlan taskExecutionPlan, TaskExecutionListener taskListener) {
    this.taskExecutionPlan = taskExecutionPlan;
    this.taskListener = taskListener;
}
项目:Pushjet-Android    文件:DefaultTaskGraphExecuter.java   
public DefaultTaskGraphExecuter(ListenerManager listenerManager, TaskPlanExecutor taskPlanExecutor) {
    this.taskPlanExecutor = taskPlanExecutor;
    graphListeners = listenerManager.createAnonymousBroadcaster(TaskExecutionGraphListener.class);
    taskListeners = listenerManager.createAnonymousBroadcaster(TaskExecutionListener.class);
}
项目:Pushjet-Android    文件:DefaultTaskGraphExecuter.java   
public void addTaskExecutionListener(TaskExecutionListener listener) {
    taskListeners.add(listener);
}
项目:Pushjet-Android    文件:DefaultTaskGraphExecuter.java   
public void removeTaskExecutionListener(TaskExecutionListener listener) {
    taskListeners.remove(listener);
}
项目:Pushjet-Android    文件:TaskPlanExecutor.java   
void process(TaskExecutionPlan taskExecutionPlan, TaskExecutionListener taskListener);
项目:Pushjet-Android    文件:TaskPlanExecutor.java   
void process(TaskExecutionPlan taskExecutionPlan, TaskExecutionListener taskListener);