Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

ConnectionPool Class Reference

List of all members.

Public Member Functions

 this (InternetAddress address)
synchronized Connection borrow (ulong time)
synchronized void close ()

Private Attributes

int count
InternetAddress address
PoolConnection freelist
const ulong timeout = 60_000

Detailed Description

A pool of socket connections for accessing cluster nodes. Note that the entries will timeout after a period of inactivity, and will subsequently cause a connected host to drop the supporting session.

Definition at line 763 of file Cluster.d.


Member Function Documentation

this InternetAddress  address  )  [inline]
 

Create a connection-pool for the specified address.

Definition at line 869 of file Cluster.d.

References address.

synchronized Connection borrow ulong  time  )  [inline]
 

Allocate a Connection from a list rather than creating a new one. Reap old entries as we go.

Definition at line 881 of file Cluster.d.

References ConnectionPool::PoolConnection::close(), ConnectionPool::PoolConnection::next, ConnectionPool::PoolConnection::time, and time.

Referenced by Node::request().

synchronized void close  )  [inline]
 

Close this pool and drop all existing connections.

Definition at line 903 of file Cluster.d.

Referenced by Node::fail().


Member Data Documentation

int count [private]
 

Definition at line 765 of file Cluster.d.

InternetAddress address [private]
 

Definition at line 766 of file Cluster.d.

Referenced by ConnectionPool::PoolConnection::reset(), and this().

PoolConnection freelist [private]
 

Definition at line 767 of file Cluster.d.

Referenced by ConnectionPool::PoolConnection::done().

const ulong timeout = 60_000 [private]
 

Definition at line 768 of file Cluster.d.


The documentation for this class was generated from the following file:
Generated on Sun Nov 7 19:07:01 2004 for Mango by doxygen 1.3.6