C# 클래스 MySql.Data.MySqlClient.MySqlPool

Summary description for MySqlPool.
파일 보기 프로젝트 열기: elevate/mysqlconnector-.net 1 사용 예제들

Private Properties

프로퍼티 타입 설명
Clear void
CreateNewPooledConnection Driver
EnqueueIdle void
GetPooledConnection Driver
RemoveOldIdleConnections List
TryToGetDriver Driver

공개 메소드들

메소드 설명
GetConnection ( ) : Driver
MySqlPool ( MySqlConnectionStringBuilder settings ) : System
ReleaseConnection ( Driver driver ) : void
RemoveConnection ( Driver driver ) : void

Removes a connection from the in use pool. The only situations where this method would be called are when a connection that is in use gets some type of fatal exception or when the connection is being returned to the pool and it's too old to be returned.

비공개 메소드들

메소드 설명
Clear ( ) : void

Clears this pool of all idle connections and marks this pool and being cleared so all other connections are closed when they are returned.

CreateNewPooledConnection ( ) : Driver

It is assumed that this method is only called from inside an active lock.

EnqueueIdle ( Driver driver ) : void
GetPooledConnection ( ) : Driver

It is assumed that this method is only called from inside an active lock.

RemoveOldIdleConnections ( ) : List

Remove expired drivers from the idle pool

Closing driver is a potentially lengthy operation involving network IO. Therefore we do not close expired drivers while holding idlePool.SyncRoot lock. We just remove the old drivers from the idle queue and return them to the caller. The caller will need to close them (or let GC close them)

TryToGetDriver ( ) : Driver

메소드 상세

GetConnection() 공개 메소드

public GetConnection ( ) : Driver
리턴 Driver

MySqlPool() 공개 메소드

public MySqlPool ( MySqlConnectionStringBuilder settings ) : System
settings MySqlConnectionStringBuilder
리턴 System

ReleaseConnection() 공개 메소드

public ReleaseConnection ( Driver driver ) : void
driver Driver
리턴 void

RemoveConnection() 공개 메소드

Removes a connection from the in use pool. The only situations where this method would be called are when a connection that is in use gets some type of fatal exception or when the connection is being returned to the pool and it's too old to be returned.
public RemoveConnection ( Driver driver ) : void
driver Driver
리턴 void