Пример #1
0
 /// <summary>
 /// Creates a new <see cref="BackgroundArchiveValuesWriter"/> object.
 /// </summary>
 /// <param name="historian">The owning historian.</param>
 /// <param name="interval">The interval between writes.</param>
 /// <param name="loggerFactory">The logger factory to use.</param>
 /// <exception cref="ArgumentNullException"><paramref name="historian"/> is <see langword="null"/>.</exception>
 internal BackgroundArchiveValuesWriter(ElasticsearchHistorian historian, TimeSpan interval, ILoggerFactory loggerFactory)
 {
     _historian              = historian ?? throw new ArgumentNullException(nameof(historian));
     _logger                 = loggerFactory?.CreateLogger <BackgroundSnapshotValuesWriter>();
     _interval               = interval;
     _nextInsert             = new BulkDescriptor();
     _writeOperationsPending = false;
 }
Пример #2
0
 /// <summary>
 /// Creates a new <see cref="ElasticsearchTagDefinition"/> object.
 /// </summary>
 /// <param name="historian">The owning historian.</param>
 /// <param name="id">The tag ID.</param>
 /// <param name="settings">The tag settings.</param>
 /// <param name="metadata">The tag metadata.</param>
 /// <param name="security">The tag security configuration.</param>
 /// <param name="initialTagValues">The initial tag values, to use with the exception and compression filters.</param>
 /// <param name="changeHistory">The change history information for the tag.</param>
 /// <exception cref="ArgumentNullException"><paramref name="historian"/> is <see langword="null"/>.</exception>
 /// <exception cref="ArgumentNullException"><paramref name="security"/> is <see langword="null"/>.</exception>
 internal ElasticsearchTagDefinition(ElasticsearchHistorian historian, Guid id, TagSettings settings, TagMetadata metadata, TagSecurity security, InitialTagValues initialTagValues, IEnumerable <TagChangeHistoryEntry> changeHistory) : base(historian, id.ToString(), settings, metadata, security, initialTagValues, changeHistory)
 {
     _historian = historian ?? throw new ArgumentNullException(nameof(historian));
     IdAsGuid   = id;
 }
Пример #3
0
 /// <summary>
 /// Creates a new <see cref="BackgroundSnapshotValuesWriter"/> object.
 /// </summary>
 /// <param name="historian">The owning historian.</param>
 /// <param name="interval">The interval between writes.</param>
 /// <param name="loggerFactory">The logger factory to use.</param>
 /// <exception cref="ArgumentNullException"><paramref name="historian"/> is <see langword="null"/>.</exception>
 internal BackgroundSnapshotValuesWriter(ElasticsearchHistorian historian, TimeSpan writeInterval, ILoggerFactory loggerFactory)
 {
     _historian = historian ?? throw new ArgumentNullException(nameof(historian));
     _logger    = loggerFactory?.CreateLogger <BackgroundSnapshotValuesWriter>();
     _interval  = writeInterval;
 }