当前位置: 首页>>代码示例>>Java>>正文


Java ProgressLogger类代码示例

本文整理汇总了Java中org.gradle.logging.ProgressLogger的典型用法代码示例。如果您正苦于以下问题:Java ProgressLogger类的具体用法?Java ProgressLogger怎么用?Java ProgressLogger使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ProgressLogger类属于org.gradle.logging包,在下文中一共展示了ProgressLogger类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: create

import org.gradle.logging.ProgressLogger; //导入依赖的package包/类
public ConsumerConnection create(Distribution distribution, ProgressLoggerFactory progressLoggerFactory, ConnectionParameters connectionParameters, BuildCancellationToken cancellationToken) {
    if (lock.tryLock()) {
        try {
            return delegate.create(distribution, progressLoggerFactory, connectionParameters, cancellationToken);
        } finally {
            lock.unlock();
        }
    }
    ProgressLogger logger = progressLoggerFactory.newOperation(SynchronizedToolingImplementationLoader.class);
    logger.setDescription("Wait for the other thread to finish acquiring the distribution");
    logger.started();
    lock.lock();
    try {
        return delegate.create(distribution, progressLoggerFactory, connectionParameters, cancellationToken);
    } finally {
        lock.unlock();
        logger.completed();
    }
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:20,代码来源:SynchronizedToolingImplementationLoader.java

示例2: run

import org.gradle.logging.ProgressLogger; //导入依赖的package包/类
public <T> T run(ConsumerAction<T> action) throws UnsupportedOperationException, IllegalStateException {
    ConsumerOperationParameters parameters = action.getParameters();
    ProgressListenerAdapter listener = new ProgressListenerAdapter(parameters.getProgressListener());
    ListenerManager listenerManager = loggingProvider.getListenerManager();
    listenerManager.addListener(listener);
    try {
        ProgressLogger progressLogger = loggingProvider.getProgressLoggerFactory().newOperation(ProgressLoggingConsumerActionExecutor.class);
        progressLogger.setDescription("Build");
        progressLogger.started();
        try {
            return actionExecutor.run(action);
        } finally {
            progressLogger.completed();
        }
    } finally {
        listenerManager.removeListener(listener);
    }
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:19,代码来源:ProgressLoggingConsumerActionExecutor.java

示例3: create

import org.gradle.logging.ProgressLogger; //导入依赖的package包/类
public ConsumerConnection create(Distribution distribution, ProgressLoggerFactory progressLoggerFactory, ConnectionParameters connectionParameters) {
    if (lock.tryLock()) {
        try {
            return delegate.create(distribution, progressLoggerFactory, connectionParameters);
        } finally {
            lock.unlock();
        }
    }
    ProgressLogger logger = progressLoggerFactory.newOperation(SynchronizedToolingImplementationLoader.class);
    logger.setDescription("Wait for the other thread to finish acquiring the distribution");
    logger.started();
    lock.lock();
    try {
        return delegate.create(distribution, progressLoggerFactory, connectionParameters);
    } finally {
        lock.unlock();
        logger.completed();
    }
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:20,代码来源:SynchronizedToolingImplementationLoader.java

示例4: download

import org.gradle.logging.ProgressLogger; //导入依赖的package包/类
public void download(URI address, File destination) throws Exception {
  ProgressLogger progressLogger = progressLoggerFactory.newOperation(DistributionFactory.class);
  progressLogger.setDescription(String.format("Download %s", address));
  progressLogger.started();
  try {
    new Download(new Logger(false), "Gradle Tooling API", GradleVersion.current().getVersion()).download(address, destination);
  } finally {
    progressLogger.completed();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:DistributionFactoryExt.java

示例5: getToolingImplementationClasspath

import org.gradle.logging.ProgressLogger; //导入依赖的package包/类
public ClassPath getToolingImplementationClasspath(ProgressLoggerFactory progressLoggerFactory,
                                                   File userHomeDir,
                                                   BuildCancellationToken cancellationToken) {
  ProgressLogger progressLogger = progressLoggerFactory.newOperation(DistributionFactory.class);
  progressLogger.setDescription("Validate distribution");
  progressLogger.started();
  try {
    return getToolingImpl();
  }
  finally {
    progressLogger.completed();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:DistributionFactoryExt.java

示例6: startProgress

import org.gradle.logging.ProgressLogger; //导入依赖的package包/类
private ProgressLogger startProgress(String description, Class loggingClass) {
    ProgressLogger progressLogger = progressLoggerFactory.newOperation(loggingClass != null ? loggingClass : getClass());
    progressLogger.setDescription(description);
    progressLogger.setLoggingHeader(description);
    progressLogger.started();
    return progressLogger;
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:8,代码来源:AbstractProgressLoggingHandler.java

示例7: download

import org.gradle.logging.ProgressLogger; //导入依赖的package包/类
public void download(URI address, File destination) throws Exception {
    ProgressLogger progressLogger = progressLoggerFactory.newOperation(DistributionFactory.class);
    progressLogger.setDescription(String.format("Download %s", address));
    progressLogger.started();
    try {
        new Download("Gradle Tooling API", GradleVersion.current().getVersion()).download(address, destination);
    } finally {
        progressLogger.completed();
    }
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:11,代码来源:DistributionFactory.java

示例8: getToolingImplementationClasspath

import org.gradle.logging.ProgressLogger; //导入依赖的package包/类
public ClassPath getToolingImplementationClasspath(ProgressLoggerFactory progressLoggerFactory, File userHomeDir, BuildCancellationToken cancellationToken) {
    ProgressLogger progressLogger = progressLoggerFactory.newOperation(DistributionFactory.class);
    progressLogger.setDescription("Validate distribution");
    progressLogger.started();
    try {
        return getToolingImpl();
    } finally {
        progressLogger.completed();
    }
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:11,代码来源:DistributionFactory.java

示例9: GradleBuildComparison

import org.gradle.logging.ProgressLogger; //导入依赖的package包/类
public GradleBuildComparison(
        ComparableGradleBuildExecuter sourceBuildExecuter,
        ComparableGradleBuildExecuter targetBuildExecuter,
        Logger logger,
        ProgressLogger progressLogger,
        Gradle gradle) {
    this.sourceBuildExecuter = sourceBuildExecuter;
    this.targetBuildExecuter = targetBuildExecuter;
    this.logger = logger;
    this.progressLogger = progressLogger;
    this.gradle = gradle;
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:13,代码来源:GradleBuildComparison.java

示例10: beforeResolve

import org.gradle.logging.ProgressLogger; //导入依赖的package包/类
public void beforeResolve(ResolvableDependencies dependencies) {
    LinkedList<ProgressLogger> loggers = progressLoggers.get();
    progressLoggers.set(loggers);
    ProgressLogger logger = loggerFactory.newOperation(DependencyResolutionLogger.class);
    logger.start(String.format("Resolve %s", dependencies), String.format("Resolving %s", dependencies));
    loggers.add(logger);
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:8,代码来源:DependencyResolutionLogger.java

示例11: afterResolve

import org.gradle.logging.ProgressLogger; //导入依赖的package包/类
public void afterResolve(ResolvableDependencies dependencies) {
    LinkedList<ProgressLogger> loggers = progressLoggers.get();
    if (loggers.isEmpty()) {
        throw new IllegalStateException("Logging operation was not started or it has already completed.");
    }
    ProgressLogger logger = loggers.removeLast();
    logger.completed();
    if (loggers.isEmpty()) {
        progressLoggers.remove();
    }
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:12,代码来源:DependencyResolutionLogger.java

示例12: execute

import org.gradle.logging.ProgressLogger; //导入依赖的package包/类
public void execute(PersistentCache cache) {
    ProgressLogger op = progressLoggerFactory.newOperation(FileCacheBackedScriptClassCompiler.class)
            .start("Compile script into cache", "Compiling script into cache");
    try {
        delegate.execute(cache);
    } finally {
        op.completed();
    }
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:10,代码来源:FileCacheBackedScriptClassCompiler.java

示例13: currentHierarchy

import org.gradle.logging.ProgressLogger; //导入依赖的package包/类
public OperationsHierarchy currentHierarchy(ProgressLogger parentHint) {
    LinkedList<Long> h = hierarchy.get();
    if (h == null) {
        h = new LinkedList<Long>();
        if (parentHint != null) {
            h.add(parentHint.currentOperationId());
        }
        hierarchy.set(h);
    }
    return new OperationsHierarchy(sharedCounter, h);
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:12,代码来源:OperationsHierarchyKeeper.java

示例14: buildFinished

import org.gradle.logging.ProgressLogger; //导入依赖的package包/类
public void buildFinished() {
    for (ProgressLogger l : projectConfigurationProgress.values()) {
        l.completed();
    }
    if (configurationProgress != null) {
        configurationProgress.completed();
    }
    buildProgress.completed();
    buildProgress = null;
    buildProgressFormatter = null;
    configurationProgress = null;
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:13,代码来源:BuildProgressLogger.java

示例15: afterEvaluate

import org.gradle.logging.ProgressLogger; //导入依赖的package包/类
public void afterEvaluate(String projectPath) {
    if (configurationProgress != null) {
        ProgressLogger logger = projectConfigurationProgress.remove(projectPath);
        if (logger == null) {
            throw new IllegalStateException("Unexpected afterEvaluate event received without beforeEvaluate");
        }
        logger.completed();
        configurationProgress.progress(configurationProgressFormatter.incrementAndGetProgress());
    }
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:11,代码来源:BuildProgressLogger.java


注:本文中的org.gradle.logging.ProgressLogger类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。