C# Class PIAdapters.PIConnectionPool

Inheritance: IDisposable
显示文件 Open project: GridProtectionAlliance/gsf

Public Methods

Method Description
Dispose ( ) : void

Releases all the resources used by the PIConnectionPool object.

GetPooledConnection ( string serverName, string userName = null, string password = null, int connectTimeout = PIConnection.DefaultConnectTimeout ) : PIConnection

Gets a connection from the pool or creates a new one if all current connections are being used at peak access.

PIConnectionPool ( ) : System

Creates a new PIConnectionPool.

PIConnectionPool ( int minimumPoolSize ) : System

Creates a new PIConnectionPool.

ReturnPooledConnection ( PIConnection connection ) : void

Returns PIConnection to the pool.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Releases the unmanaged resources used by the PIConnectionPool object and optionally releases the managed resources.

Private Methods

Method Description
connection_Disconnected ( object sender, EventArgs e ) : void

Method Details

Dispose() public method

Releases all the resources used by the PIConnectionPool object.
public Dispose ( ) : void
return void

Dispose() protected method

Releases the unmanaged resources used by the PIConnectionPool object and optionally releases the managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
return void

GetPooledConnection() public method

Gets a connection from the pool or creates a new one if all current connections are being used at peak access.
Failed to get a pooled PI connection.
public GetPooledConnection ( string serverName, string userName = null, string password = null, int connectTimeout = PIConnection.DefaultConnectTimeout ) : PIConnection
serverName string Name of the PI server for the adapter's PI connection.
userName string Name of the PI user ID for the adapter's PI connection.
password string Password used for the adapter's PI connection.
connectTimeout int Timeout interval (in milliseconds) for the adapter's connection.
return PIConnection

PIConnectionPool() public method

Creates a new PIConnectionPool.
public PIConnectionPool ( ) : System
return System

PIConnectionPool() public method

Creates a new PIConnectionPool.
public PIConnectionPool ( int minimumPoolSize ) : System
minimumPoolSize int Minimum pool size to maintain.
return System

ReturnPooledConnection() public method

Returns PIConnection to the pool.
Provided PIConnection does not belong to this connection pool.
public ReturnPooledConnection ( PIConnection connection ) : void
connection PIConnection to return to the pool.
return void