Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ZPagesExporter"/> class.
        /// </summary>
        /// <param name="options">Options for the exporter.</param>
        public ZPagesExporter(ZPagesExporterOptions options)
        {
            this.Options = options;

            // Create a timer with one minute interval
            this.minuteTimer          = new Timer(60000);
            this.minuteTimer.Elapsed += new ElapsedEventHandler(ZPagesSpans.PurgeCurrentMinuteData);
            this.minuteTimer.Enabled  = true;

            // Create a timer with one hour interval
            this.hourTimer          = new Timer(3600000);
            this.hourTimer.Elapsed += new ElapsedEventHandler(ZPagesSpans.PurgeCurrentHourData);
            this.hourTimer.Enabled  = true;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ZPagesExporter"/> class.
        /// </summary>
        /// <param name="options">Options for the exporter.</param>
        public ZPagesExporter(ZPagesExporterOptions options)
        {
            ZPagesActivityTracker.RetentionTime = options?.RetentionTime ?? throw new ArgumentNullException(nameof(options));

            this.Options = options;

            // Create a timer with one minute interval
            this.minuteTimer          = new Timer(60000);
            this.minuteTimer.Elapsed += new ElapsedEventHandler(ZPagesActivityTracker.PurgeCurrentMinuteData);
            this.minuteTimer.Enabled  = true;

            // Create a timer with one hour interval
            this.hourTimer          = new Timer(3600000);
            this.hourTimer.Elapsed += new ElapsedEventHandler(ZPagesActivityTracker.PurgeCurrentHourData);
            this.hourTimer.Enabled  = true;
        }
Exemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ZPagesExporter"/> class.
        /// </summary>
        /// <param name="options">Options for the exporter.</param>
        public ZPagesExporter(ZPagesExporterOptions options)
        {
            Guard.ThrowIfNull(options?.RetentionTime);

            ZPagesActivityTracker.RetentionTime = options.RetentionTime;

            this.Options = options;

            // Create a timer with one minute interval
            this.minuteTimer          = new Timer(60000);
            this.minuteTimer.Elapsed += new ElapsedEventHandler(ZPagesActivityTracker.PurgeCurrentMinuteData);
            this.minuteTimer.Enabled  = true;

            // Create a timer with one hour interval
            this.hourTimer          = new Timer(3600000);
            this.hourTimer.Elapsed += new ElapsedEventHandler(ZPagesActivityTracker.PurgeCurrentHourData);
            this.hourTimer.Enabled  = true;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="ZPagesExporter"/> class.
 /// </summary>
 /// <param name="options">Options for the exporter.</param>
 public ZPagesExporter(ZPagesExporterOptions options)
 {
     this.Options = options;
 }