openlsd.multiple.ophandler.common
Class LSDPoolLSDConnection

java.lang.Object
  extended by openlsd.multiple.ophandler.common.LSDPoolLSDConnection

public class LSDPoolLSDConnection
extends java.lang.Object

This class implements a pool of LSD connection to remote LSD Servers.

Author:
Frederic BREGIER LGPL 2007

Field Summary
 java.util.concurrent.ConcurrentHashMap<java.lang.Long,LSDPoolConnection> hashMapPoolConnection
          Hash map of all PoolConnection Object based on IpPort Id
 
Constructor Summary
LSDPoolLSDConnection()
          Empty constructor
 
Method Summary
 void closeAll()
          Close all connection and pools
 LSDPoolClientDelete getDeleteConn(LSDDbAdmin admin, long idip)
          Get a Connection to a Delete client
 LSDPoolClientGet getGetConn(LSDDbAdmin admin, long idip)
          Get a Connection to a Get client
 LSDPoolClientInfo getInfoConn(LSDDbAdmin admin, long idip)
          Get a Connection to a Info client
 LSDPoolClientMove getMoveConn(LSDDbAdmin admin, long idip)
          Get a Connection to a Move client
 int[] getNbInPool()
          Returns the number of sessions in all pool (Delete, Put, Info, Get, Move)
 LSDPoolClientPut getPutConn(LSDDbAdmin admin, long idip)
          Get a Connection to a Put client
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hashMapPoolConnection

public java.util.concurrent.ConcurrentHashMap<java.lang.Long,LSDPoolConnection> hashMapPoolConnection
Hash map of all PoolConnection Object based on IpPort Id

Constructor Detail

LSDPoolLSDConnection

public LSDPoolLSDConnection()
Empty constructor

Method Detail

getPutConn

public LSDPoolClientPut getPutConn(LSDDbAdmin admin,
                                   long idip)
Get a Connection to a Put client

Parameters:
admin -
idip -
Returns:
the Client connection

getDeleteConn

public LSDPoolClientDelete getDeleteConn(LSDDbAdmin admin,
                                         long idip)
Get a Connection to a Delete client

Parameters:
admin -
idip -
Returns:
the Client connection

getInfoConn

public LSDPoolClientInfo getInfoConn(LSDDbAdmin admin,
                                     long idip)
Get a Connection to a Info client

Parameters:
admin -
idip -
Returns:
the Client connection

getGetConn

public LSDPoolClientGet getGetConn(LSDDbAdmin admin,
                                   long idip)
Get a Connection to a Get client

Parameters:
admin -
idip -
Returns:
the Client connection

getMoveConn

public LSDPoolClientMove getMoveConn(LSDDbAdmin admin,
                                     long idip)
Get a Connection to a Move client

Parameters:
admin -
idip -
Returns:
the Client connection

getNbInPool

public int[] getNbInPool()
Returns the number of sessions in all pool (Delete, Put, Info, Get, Move)

Returns:
the number of sessions

closeAll

public void closeAll()
Close all connection and pools