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 768 of file Cluster.d.


Member Function Documentation

this InternetAddress  address  )  [inline]
 

Create a connection-pool for the specified address.

Definition at line 874 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 886 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 908 of file Cluster.d.

Referenced by Node::fail().


Member Data Documentation

int count [private]
 

Definition at line 770 of file Cluster.d.

InternetAddress address [private]
 

Definition at line 771 of file Cluster.d.

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

PoolConnection freelist [private]
 

Definition at line 772 of file Cluster.d.

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

const ulong timeout = 60_000 [private]
 

Definition at line 773 of file Cluster.d.


The documentation for this class was generated from the following file:
Generated on Sun Mar 6 00:31:07 2005 for Mango by doxygen 1.3.6