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


Java TrackerConfig类代码示例

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


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

示例1: loadLoggerConfig

import com.jkoolcloud.tnt4j.config.TrackerConfig; //导入依赖的package包/类
/**
 * Loads and sets up instance of {@link TrackerConfig} to be used to create scheduler logger.
 *
 * @param name name of assigned to the sampler
 * @param sFactory sampler factory instance
 * @param listener activity listener invoked when scheduled activity starts and stops
 * @return tracker configuration used to create scheduler logger
 */
protected static TrackerConfig loadLoggerConfig(String name, SamplerFactory sFactory, ActivityListener listener) {
	TrackerConfig config = DefaultConfigFactory.getInstance().getConfig(name);

	if (sFactory != null && StringUtils.isEmpty(config.getProperty("event.formatter"))) {
		config.setProperty("event.formatter", sFactory.defaultEventFormatterClassName());
		((TrackerConfigStore) config).applyProperties();
	}

	if (listener != null) {
		config.setActivityListener(listener);
	}

	return config;
}
 
开发者ID:Nastel,项目名称:tnt4j-stream-jmx,代码行数:23,代码来源:SchedulerImpl.java

示例2: TrackerImpl

import com.jkoolcloud.tnt4j.config.TrackerConfig; //导入依赖的package包/类
protected TrackerImpl(TrackerConfig config, boolean keepContext) {
	if (!config.isBuilt()) {
		throw new IllegalArgumentException("Uninitialized tracker configuration: use config.build()");
	}
	this.keepContext = keepContext;
	this.tConfig = config;
	this.id = newUUID();
	this.selector = tConfig.getTrackingSelector();
	this.eventSink = tConfig.getEventSink();
	open();
}
 
开发者ID:Nastel,项目名称:TNT4J,代码行数:12,代码来源:TrackerImpl.java

示例3: getConfiguration

import com.jkoolcloud.tnt4j.config.TrackerConfig; //导入依赖的package包/类
@Override
public TrackerConfig getConfiguration() {
	checkState();
	return logger.getConfiguration();
}
 
开发者ID:Nastel,项目名称:TNT4J,代码行数:6,代码来源:TrackingLogger.java

示例4: getConfiguration

import com.jkoolcloud.tnt4j.config.TrackerConfig; //导入依赖的package包/类
@Override
public TrackerConfig getConfiguration() {
	return tConfig;
}
 
开发者ID:Nastel,项目名称:TNT4J,代码行数:5,代码来源:TrackerImpl.java

示例5: newUUID

import com.jkoolcloud.tnt4j.config.TrackerConfig; //导入依赖的package包/类
public String newUUID(TrackerConfig tConfig) {
	return tConfig.getUUIDFactory().newUUID();
}
 
开发者ID:Nastel,项目名称:TNT4J,代码行数:4,代码来源:TrackerImpl.java

示例6: getInstance

import com.jkoolcloud.tnt4j.config.TrackerConfig; //导入依赖的package包/类
@Override
public Tracker getInstance(TrackerConfig tconfig) {
 return new TrackerImpl(tconfig, defaultKeepContext);
}
 
开发者ID:Nastel,项目名称:TNT4J,代码行数:5,代码来源:DefaultTrackerFactory.java

示例7: ActivityScheduler

import com.jkoolcloud.tnt4j.config.TrackerConfig; //导入依赖的package包/类
/**
 * Creates a scheduler with specified name.
 *
 * @param name
 *            scheduler name
 * @param listener
 *            activity listener invoked when scheduled activity starts and stops
 *
 * @see ActivityListener
 */
public ActivityScheduler(String name, ActivityListener listener) {
	this.name = name;
	TrackerConfig config = DefaultConfigFactory.getInstance().getConfig(name);
	if (listener != null)
		config.setActivityListener(listener);
	this.logger = TrackingLogger.getInstance(config.build());
	this.logger.setKeepThreadContext(false);
}
 
开发者ID:Nastel,项目名称:TNT4J,代码行数:19,代码来源:ActivityScheduler.java

示例8: getInstance

import com.jkoolcloud.tnt4j.config.TrackerConfig; //导入依赖的package包/类
/**
 * Obtain an instance of {@code TrackingLogger} logger.
 *
 * @param sourceName
 *            application source name associated with this logger
 * @return tracking logger instance
 * @see TrackerConfig
 */
public static TrackingLogger getInstance(String sourceName) {
	TrackerConfig config = DefaultConfigFactory.getInstance().getConfig(sourceName);
	TrackingLogger tracker = new TrackingLogger(factory.getInstance(config.build()));
	registerTracker(tracker);
	return tracker;
}
 
开发者ID:Nastel,项目名称:TNT4J,代码行数:15,代码来源:TrackingLogger.java

示例9: getInstance

import com.jkoolcloud.tnt4j.config.TrackerConfig; //导入依赖的package包/类
/**
 * Obtain an instance to a {@link com.jkoolcloud.tnt4j.tracker.Tracker} logger. Each thread must obtain a logger
 * instance. {@link com.jkoolcloud.tnt4j.tracker.Tracker} logger is not thread safe.
 * 
 * @param tconfig
 *            tracking configuration associated with the tracking instance
 * @return {@link com.jkoolcloud.tnt4j.tracker.Tracker} logger instance associated with this thread
 */
Tracker getInstance(TrackerConfig tconfig);
 
开发者ID:Nastel,项目名称:TNT4J,代码行数:10,代码来源:TrackerFactory.java

示例10: getConfiguration

import com.jkoolcloud.tnt4j.config.TrackerConfig; //导入依赖的package包/类
/**
 * Obtains current/active {@link TrackerConfig} configuration associated with
 * the current tracker instance.
 *
 * @return current tracking configuration
 * @see TrackerConfig
 */
TrackerConfig getConfiguration();
 
开发者ID:Nastel,项目名称:TNT4J,代码行数:9,代码来源:Tracker.java


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