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
{
///
/// IoTDB SessionPool 运行时上下文
///
public class IoTDBRuntimeContext
{
private readonly bool _defaultValue;
public IoTDBRuntimeContext(IOptions options)
{
_defaultValue = options.Value.UseTableSessionPoolByDefault;
UseTableSessionPool = _defaultValue;
}
///
/// 是否使用表模型存储, 默认false,使用tree模型存储
///
public bool UseTableSessionPool { get; set; }
///
/// 重置为默认值
///
public void ResetToDefault()
{
UseTableSessionPool = _defaultValue;
}
}
}