Nitido Inc.

com.nitido.nimx.services.dirpool.mozilla
Class DirPool

java.lang.Object
  extended by com.nitido.nimx.services.dirpool.mozilla.DirPool

public class DirPool
extends java.lang.Object

The DirPool data object contains all the data associated to a specific pool.


Field Summary
protected  java.lang.String _name
          The pool's name.
protected  netscape.ldap.util.ConnectionPool _pool
          The Netscape LDAP Java SDK's ConnectionPool object.
protected  java.lang.Object _readMutex
          Mutex object for connection requesting thread.
protected  int _throttleLimit
           
protected  int _timeLimit
           
protected  long _timestamp
          The timestamp when the connection pool will expired.
 
Constructor Summary
DirPool(java.lang.String name, netscape.ldap.util.ConnectionPool pool, int timeLimit, int throttleLimit)
           
 
Method Summary
 DirConnection getConnection(java.lang.String dn, java.lang.String password)
           
protected  int getObtainedCount()
           
protected  int[] getReservedAndObtained()
           
protected  int getReservedCount()
           
 boolean releaseConnection(DirConnection dirCon, boolean isGoodConn)
          Trying to release the connection to the pool.
protected  void setIsRetired(boolean isRetired)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_name

protected final java.lang.String _name
The pool's name. This is the name that the application used to get the connection from the DirPoolService.


_timestamp

protected final long _timestamp
The timestamp when the connection pool will expired. If the auto reset pool option is enabled, this will be storing the expiry time. Otherwise, it will store the creation time. In combination with the _name field, it uniquely identify the DirPool object instance.


_pool

protected netscape.ldap.util.ConnectionPool _pool
The Netscape LDAP Java SDK's ConnectionPool object.


_timeLimit

protected final int _timeLimit

_throttleLimit

protected final int _throttleLimit

_readMutex

protected final java.lang.Object _readMutex
Mutex object for connection requesting thread.

Constructor Detail

DirPool

public DirPool(java.lang.String name,
               netscape.ldap.util.ConnectionPool pool,
               int timeLimit,
               int throttleLimit)
Method Detail

getConnection

public DirConnection getConnection(java.lang.String dn,
                                   java.lang.String password)
                            throws netscape.ldap.LDAPException
Throws:
netscape.ldap.LDAPException

releaseConnection

public boolean releaseConnection(DirConnection dirCon,
                                 boolean isGoodConn)
                          throws netscape.ldap.LDAPException
Trying to release the connection to the pool.

Returns:
true if the connection has been succesfully released.
Throws:
netscape.ldap.LDAPException

setIsRetired

protected void setIsRetired(boolean isRetired)

getReservedCount

protected int getReservedCount()

getObtainedCount

protected int getObtainedCount()

getReservedAndObtained

protected int[] getReservedAndObtained()
Returns:
an array of integer, where index=0 is the reserved count, index=1 is the obtained count;

Nitido NiM 2.5 Java API

These JavaDoc pages are generated for release/nim_2_5-2.5.44

Copyright © 1999-2009 Nitido Inc.    Proprietary and Confidential.    All Rights Reserved.