Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | 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

Classes

class  PoolConnection

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


Member Function Documentation

this InternetAddress  address  )  [inline]
 

Create a connection-pool for the specified address.

Definition at line 873 of file Cluster.d.

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

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

Referenced by Node::request().

synchronized void close  )  [inline]
 

Close this pool and drop all existing connections.

Definition at line 907 of file Cluster.d.


Member Data Documentation

int count [private]
 

Definition at line 769 of file Cluster.d.

InternetAddress address [private]
 

Definition at line 770 of file Cluster.d.

PoolConnection freelist [private]
 

Definition at line 771 of file Cluster.d.

const ulong timeout = 60_000 [private]
 

Definition at line 772 of file Cluster.d.


The documentation for this class was generated from the following file:
Generated on Mon Nov 14 10:59:50 2005 for Mango by  doxygen 1.4.0