37 lines
956 B
C#
37 lines
956 B
C#
|
|
using Microsoft.Extensions.Options;
|
|||
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.Linq;
|
|||
|
|
using System.Text;
|
|||
|
|
using System.Threading.Tasks;
|
|||
|
|
|
|||
|
|
namespace JiShe.CollectBus.IoTDBProvider.Context
|
|||
|
|
{
|
|||
|
|
/// <summary>
|
|||
|
|
/// IoTDB SessionPool 运行时上下文
|
|||
|
|
/// </summary>
|
|||
|
|
public class IoTDBRuntimeContext
|
|||
|
|
{
|
|||
|
|
private readonly bool _defaultValue;
|
|||
|
|
|
|||
|
|
public IoTDBRuntimeContext(IOptions<IoTDBOptions> options)
|
|||
|
|
{
|
|||
|
|
_defaultValue = options.Value.UseTableSessionPoolByDefault;
|
|||
|
|
UseTableSessionPool = _defaultValue;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 是否使用表模型存储, 默认false,使用tree模型存储
|
|||
|
|
/// </summary>
|
|||
|
|
public bool UseTableSessionPool { get; set; }
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 重置为默认值
|
|||
|
|
/// </summary>
|
|||
|
|
public void ResetToDefault()
|
|||
|
|
{
|
|||
|
|
UseTableSessionPool = _defaultValue;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|