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


Java VarExporter.export方法代码示例

本文整理汇总了Java中com.indeed.util.varexport.VarExporter.export方法的典型用法代码示例。如果您正苦于以下问题:Java VarExporter.export方法的具体用法?Java VarExporter.export怎么用?Java VarExporter.export使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.indeed.util.varexport.VarExporter的用法示例。


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

示例1: createStore

import com.indeed.util.varexport.VarExporter; //导入方法依赖的package包/类
public ProctorStore createStore(final String relativePath) {

        final File tempDirectory = createTempDirectoryForPath(relativePath);

        Preconditions.checkArgument(!CharMatcher.WHITESPACE.matchesAllOf(Strings.nullToEmpty(gitUrl)), "scm.path property cannot be empty");

        final GitWorkspaceProviderImpl provider = new GitWorkspaceProviderImpl(tempDirectory, gitDirectoryLockTimeoutSeconds);
        final GitProctorCore gitCore = new GitProctorCore(gitUrl, gitUsername, gitPassword, testDefinitionsDirectory,
                provider, gitPullPushTimeoutSeconds, gitCloneTimeoutSeconds, gitCleanInitialization);

        final String branchName = relativePath.substring(relativePath.lastIndexOf("/")+1);
        final GitProctor store = new GitProctor(gitCore, testDefinitionsDirectory, branchName);
        final String prefix = relativePath.replace('/', '-');
        final VarExporter exporter = VarExporter.forNamespace(GitProctor.class.getSimpleName()).includeInGlobal();
        exporter.export(store, prefix + "-");
        return new CachingProctorStore(store);
    }
 
开发者ID:indeedeng,项目名称:proctor-webapp-library,代码行数:18,代码来源:GitProctorStoreFactory.java

示例2: createStore

import com.indeed.util.varexport.VarExporter; //导入方法依赖的package包/类
public ProctorStore createStore(final String relativePath) {
    Preconditions.checkArgument(tempDirCleanupAgeMillis > 0, "tempDirCleanupAgeMillis %s must be greater than zero", tempDirCleanupAgeMillis);
    final File tempDirectory = createTempDirectoryForPath(relativePath);

    Preconditions.checkArgument(!CharMatcher.WHITESPACE.matchesAllOf(Strings.nullToEmpty(svnPath)), "svn.path property cannot be empty");
    // TODO (parker) 9/13/12 - sanity check that path + relative path make a valid url
    final String fullPath = svnPath + relativePath;

    final SvnWorkspaceProviderImpl provider = new SvnWorkspaceProviderImpl(tempDirectory, tempDirCleanupAgeMillis);
    final SvnPersisterCoreImpl svncore = new SvnPersisterCoreImpl(fullPath, svnUsername, svnPassword, testDefinitionsDirectory, provider, true /* shutdown provider */);

    // actively clean up directories every hour: (not relying on cache eviction)
    final long cleanupScheduleMillis = Math.min(TimeUnit.HOURS.toMillis(1), tempDirCleanupAgeMillis);
    LOGGER.info("Scheduling SvnWorkspaceProvider every " + cleanupScheduleMillis + " milliseconds for dir: " + tempDirectory + " with age millis " + tempDirCleanupAgeMillis);
    executor.scheduleWithFixedDelay(provider, cleanupScheduleMillis, cleanupScheduleMillis, TimeUnit.MILLISECONDS);

    if(svnRefreshMillis > 0) {
        final SvnDirectoryRefresher refresher = svncore.createRefresherTask();
        LOGGER.info("Scheduling SvnDirectoryRefresher every " + svnRefreshMillis + " milliseconds for dir: " + refresher.getDirectoryPath());
        executor.scheduleWithFixedDelay(refresher, svnRefreshMillis, svnRefreshMillis, TimeUnit.MILLISECONDS);
    }

    final SvnProctor store = new SvnProctor(cache ? new CachedSvnPersisterCore(svncore) : svncore, testDefinitionsDirectory);
    final VarExporter exporter = VarExporter.forNamespace(SvnProctor.class.getSimpleName()).includeInGlobal();
    final String prefix = relativePath.substring(1).replace('/', '-');
    exporter.export(store, prefix + "-");
    return store;
}
 
开发者ID:indeedeng,项目名称:proctor-webapp-library,代码行数:29,代码来源:SvnProctorStoreFactory.java

示例3: ProctorPromoter

import com.indeed.util.varexport.VarExporter; //导入方法依赖的package包/类
public ProctorPromoter(final ProctorStore trunk,
                       final ProctorStore qa,
                       final ProctorStore production,
                       final ExecutorService executor) {
    this.trunk = trunk;
    this.qa = qa;
    this.production = production;

    if (executor instanceof ThreadPoolExecutor) {
        final VarExporter exporter = VarExporter.forNamespace(getClass().getSimpleName());
        exporter.export(new ThreadPoolExecutorVarExports((ThreadPoolExecutor) executor), "ProctorPromoter-pool-");
    }
    this.executor = executor;
}
 
开发者ID:indeedeng,项目名称:proctor-webapp-library,代码行数:15,代码来源:ProctorPromoter.java

示例4: SystemExports

import com.indeed.util.varexport.VarExporter; //导入方法依赖的package包/类
SystemExports(final boolean includeInGlobal) {
    for (final Map.Entry<Object, Object> prop : System.getProperties().entrySet()) {
        systemProperties.put((String) prop.getKey(), (String) prop.getValue());
    }
    final VarExporter e = VarExporter.forNamespace("system");
    if (includeInGlobal) {
        e.includeInGlobal();
    }
    e.export(this, "");
}
 
开发者ID:indeedeng,项目名称:iql,代码行数:11,代码来源:WebApp.java

示例5: BackgroundJobManager

import com.indeed.util.varexport.VarExporter; //导入方法依赖的package包/类
public BackgroundJobManager(final ThreadPoolExecutor executor) {
    final VarExporter exporter = VarExporter.forNamespace(getClass().getSimpleName());

    exporter.export(new ThreadPoolExecutorVarExports(executor), "pool-");
    this.service = executor;
}
 
开发者ID:indeedeng,项目名称:proctor-webapp-library,代码行数:7,代码来源:BackgroundJobManager.java


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