天津投入产出系统后端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

42 lines
1.3 KiB

using System;
namespace Common.Data
{
/// <summary>
/// 功能:连接池接口
/// 作者:王昊昇
/// 时间:2012.2.8
/// </summary>
public interface IConnectionPooling : IDisposable
{
/// <summary>
/// 启动连接池,DataAccessInfo属性将被赋值为参数变量
/// </summary>
/// <param name="dai">数据源信息</param>
void StartPooling(DataAccessInfo dai);
/// <summary>
/// 启动连接池,DataAccessInfo属性必须已经被赋值,否则将报错
/// </summary>
void StartPooling();
/// <summary>
/// 获取一个数据源连接
/// </summary>
/// <param name="cu">请求该连接的用户信息</param>
/// <returns></returns>
ConnectionInfo GetConnection(ConnectionUser cu);
/// <summary>
/// 释放一个连接的占用,让这个连接处于可用状态
/// </summary>
/// <param name="cu">占用该连接的用户信息</param>
void ReleaseConnection(ConnectionUser cu);
/// <summary>
/// 销毁一个连接
/// </summary>
/// <param name="cu">占用该连接的用户信息</param>
void DisposeConnection(ConnectionUser cu);
}
}