本文整理汇总了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;
}
示例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();
}
示例3: getConfiguration
import com.jkoolcloud.tnt4j.config.TrackerConfig; //导入依赖的package包/类
@Override
public TrackerConfig getConfiguration() {
checkState();
return logger.getConfiguration();
}
示例4: getConfiguration
import com.jkoolcloud.tnt4j.config.TrackerConfig; //导入依赖的package包/类
@Override
public TrackerConfig getConfiguration() {
return tConfig;
}
示例5: newUUID
import com.jkoolcloud.tnt4j.config.TrackerConfig; //导入依赖的package包/类
public String newUUID(TrackerConfig tConfig) {
return tConfig.getUUIDFactory().newUUID();
}
示例6: getInstance
import com.jkoolcloud.tnt4j.config.TrackerConfig; //导入依赖的package包/类
@Override
public Tracker getInstance(TrackerConfig tconfig) {
return new TrackerImpl(tconfig, defaultKeepContext);
}
示例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);
}
示例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;
}
示例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);
示例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();