com.tensegrity.palowebviewer.server
Class GlobalConnectionPool

java.lang.Object
  extended by com.tensegrity.palowebviewer.server.GlobalConnectionPool
All Implemented Interfaces:
IConnectionPool

public class GlobalConnectionPool
extends java.lang.Object
implements IConnectionPool


Constructor Summary
GlobalConnectionPool(PaloConfiguration configurator)
           
GlobalConnectionPool(PaloConfiguration configurator, IConnectionFactory factory)
           
 
Method Summary
 org.palo.api.Connection getConnection(java.lang.String serverId)
           
 org.palo.api.Connection getConnection(java.lang.String host, java.lang.String service)
           
 IConnectionFactory getConnectionFactory()
           
protected  int getMaxPoolConnections()
           
 int getServerCount()
           
 java.lang.String[] getServerNames()
           
 java.lang.String[] getServerProviders()
           
 java.lang.String[] getServerServices()
           
 void markForceReload()
          marks connections as NEED_RELOAD.
 void setConnectionFactrory(IConnectionFactory factory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlobalConnectionPool

public GlobalConnectionPool(PaloConfiguration configurator)

GlobalConnectionPool

public GlobalConnectionPool(PaloConfiguration configurator,
                            IConnectionFactory factory)
Method Detail

getServerServices

public java.lang.String[] getServerServices()
Specified by:
getServerServices in interface IConnectionPool
Returns:
ports of available server

getServerNames

public java.lang.String[] getServerNames()
Specified by:
getServerNames in interface IConnectionPool
Returns:
names of avaible servers

getServerProviders

public java.lang.String[] getServerProviders()
Specified by:
getServerProviders in interface IConnectionPool
Returns:
provider names of available server

getConnection

public org.palo.api.Connection getConnection(java.lang.String host,
                                             java.lang.String service)
Specified by:
getConnection in interface IConnectionPool
Returns:
open connection to appropriate server

getConnection

public org.palo.api.Connection getConnection(java.lang.String serverId)
Specified by:
getConnection in interface IConnectionPool

getMaxPoolConnections

protected int getMaxPoolConnections()

getServerCount

public int getServerCount()
Specified by:
getServerCount in interface IConnectionPool
Returns:
number servers

markForceReload

public void markForceReload()
Description copied from interface: IConnectionPool
marks connections as NEED_RELOAD. Prior getting connection from pool it will be reloaded.

Specified by:
markForceReload in interface IConnectionPool

getConnectionFactory

public IConnectionFactory getConnectionFactory()
Specified by:
getConnectionFactory in interface IConnectionPool

setConnectionFactrory

public void setConnectionFactrory(IConnectionFactory factory)
Specified by:
setConnectionFactrory in interface IConnectionPool