本文整理汇总了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);
}
示例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;
}
示例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;
}
示例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, "");
}
示例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;
}