本文整理汇总了Java中com.indeed.util.varexport.VarExporter类的典型用法代码示例。如果您正苦于以下问题:Java VarExporter类的具体用法?Java VarExporter怎么用?Java VarExporter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
VarExporter类属于com.indeed.util.varexport包,在下文中一共展示了VarExporter类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: Proctor
import com.indeed.util.varexport.VarExporter; //导入依赖的package包/类
@VisibleForTesting
Proctor(
final TestMatrixArtifact matrix,
final ProctorLoadResult loadResult,
@Nonnull Map<String, TestChooser<?>> testChoosers
) {
this.matrix = matrix;
this.loadResult = loadResult;
this.testChoosers = testChoosers;
for (final Entry<String, TestChooser<?>> entry : testChoosers.entrySet()) {
this.testDefinitions.put(entry.getKey(), entry.getValue().getTestDefinition());
}
VarExporter.forNamespace(Proctor.class.getSimpleName()).includeInGlobal().export(this, "");
VarExporter.forNamespace(DetailedExport.class.getSimpleName()).export(new DetailedExport(), ""); // intentionally not in global
}
开发者ID:indeedeng,项目名称:proctor,代码行数:17,代码来源:Proctor.java
示例3: 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
示例4: afterPropertiesSet
import com.indeed.util.varexport.VarExporter; //导入依赖的package包/类
@Override
public void afterPropertiesSet() throws Exception {
scheduledExecutorService.scheduleWithFixedDelay(proctorSpecificationSource, 1, 10, TimeUnit.MINUTES);
if(scheduledExecutorService instanceof ThreadPoolExecutor) {
VarExporter.forNamespace(getClass().getSimpleName()).export(new ThreadPoolExecutorVarExports((ThreadPoolExecutor) scheduledExecutorService), "pool-");
}
}
开发者ID:indeedeng,项目名称:proctor-webapp-library,代码行数:9,代码来源:ScheduledTasks.java
示例5: 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
示例6: 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
示例7: AbstractDependencyManager
import com.indeed.util.varexport.VarExporter; //导入依赖的package包/类
public AbstractDependencyManager(
@Nullable final String appName,
@Nullable final Logger logger,
@Nonnull final ThreadPoolExecutor threadPool,
@Nonnull final DependencyChecker checker
) {
this.appName = Strings.isNullOrEmpty(appName) ? getAppName() : appName;
this.log = null == logger ? Logger.getLogger(getClass()) : logger;
this.executor = Executors.newSingleThreadScheduledExecutor(new ThreadFactoryBuilder()
.setNameFormat("dependency-management-" + MANAGEMENT_THREAD_POOL_COUNT.getAndIncrement() + "-thread-%d")
.setDaemon(true)
.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {
@Override
public void uncaughtException(Thread t, Throwable e) {
log.error("Uncaught throwable in thread " + t.getName() + "/" + t.getId(), e);
}
})
.build()
);
this.threadPool = threadPool;
this.checker = checker;
VarExporter.forNamespace(getClass().getSimpleName()).includeInGlobal().export(this, "");
}
开发者ID:indeedeng,项目名称:status,代码行数:28,代码来源:AbstractDependencyManager.java
示例8: DependencyPinger
import com.indeed.util.varexport.VarExporter; //导入依赖的package包/类
DependencyPinger (
@Nonnull final Dependency dependency,
final long pingPeriod,
@Nonnull final DependencyChecker dependencyChecker
) {
this.checker = dependencyChecker;
this.dependency = dependency;
this.pingPeriod = pingPeriod;
VarExporter.forNamespace(DependencyPinger.class.getSimpleName() + "-" + this.dependency.getId()).includeInGlobal().export(this, "");
}
开发者ID:indeedeng,项目名称:status,代码行数:12,代码来源:DependencyPinger.java
示例9: 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
示例10: ServletContextConfiguredPropertyPlaceholderConfigurer
import com.indeed.util.varexport.VarExporter; //导入依赖的package包/类
public ServletContextConfiguredPropertyPlaceholderConfigurer() {
VarExporter.forNamespace("ResourceConfig").includeInGlobal().export(this, "");
}
开发者ID:indeedeng,项目名称:proctor-webapp-library,代码行数:4,代码来源:ServletContextConfiguredPropertyPlaceholderConfigurer.java
示例11: LocalSessionManager
import com.indeed.util.varexport.VarExporter; //导入依赖的package包/类
public LocalSessionManager() {
VarExporter.forNamespace(getClass().getSimpleName()).includeInGlobal().export(this, "");
}
开发者ID:indeedeng,项目名称:imhotep,代码行数:4,代码来源:LocalSessionManager.java
示例12: ImhotepMemoryPool
import com.indeed.util.varexport.VarExporter; //导入依赖的package包/类
public ImhotepMemoryPool(long capacityInBytes) {
this.capacityInBytes = capacityInBytes;
VarExporter.forNamespace(getClass().getSimpleName()).includeInGlobal().export(this, "");
}
开发者ID:indeedeng,项目名称:imhotep,代码行数:6,代码来源:ImhotepMemoryPool.java
示例13: CachedMemoryReserver
import com.indeed.util.varexport.VarExporter; //导入依赖的package包/类
public CachedMemoryReserver(final MemoryReserver wrapped, final ImhotepMemoryCache cache) {
this.wrapped = wrapped;
this.cache = cache;
VarExporter.forNamespace(getClass().getSimpleName()).includeInGlobal().export(this, "");
}
开发者ID:indeedeng,项目名称:imhotep,代码行数:7,代码来源:CachedMemoryReserver.java
示例14: SimpleService
import com.indeed.util.varexport.VarExporter; //导入依赖的package包/类
public SimpleService() {
VarExporter.forNamespace(getClass().getSimpleName()).includeInGlobal().export(this, "");
}
开发者ID:a86c6f7964,项目名称:ruist,代码行数:4,代码来源:SimpleTool.java
示例15: SimpleRest
import com.indeed.util.varexport.VarExporter; //导入依赖的package包/类
public SimpleRest() {
VarExporter.forNamespace(getClass().getSimpleName()).includeInGlobal().export(this, "");
}
开发者ID:a86c6f7964,项目名称:ruist,代码行数:4,代码来源:SimpleRest.java
示例16: AbstractJsonProctorLoader
import com.indeed.util.varexport.VarExporter; //导入依赖的package包/类
public AbstractJsonProctorLoader(@Nonnull final Class<?> cls, @Nonnull final ProctorSpecification specification, @Nonnull final FunctionMapper functionMapper) {
super(cls, specification, functionMapper);
final ProctorLoaderDetail detailObject = new ProctorLoaderDetail();
VarExporter.forNamespace(detailObject.getClass().getSimpleName()).export(detailObject, "");
}
开发者ID:indeedeng,项目名称:proctor,代码行数:7,代码来源:AbstractJsonProctorLoader.java
示例17: quietLogs
import com.indeed.util.varexport.VarExporter; //导入依赖的package包/类
@BeforeClass
public static void quietLogs() {
Logger.getLogger(VarExporter.class).setLevel(Level.FATAL);
}
开发者ID:indeedeng,项目名称:proctor,代码行数:5,代码来源:TestUnitTestGroupsManager.java
注:本文中的com.indeed.util.varexport.VarExporter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论