com.tensegrity.palowebviewer.server
Class GlobalConnectionPool
java.lang.Object
com.tensegrity.palowebviewer.server.GlobalConnectionPool
- All Implemented Interfaces:
- IConnectionPool
public class GlobalConnectionPool
- extends java.lang.Object
- implements IConnectionPool
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GlobalConnectionPool
public GlobalConnectionPool(PaloConfiguration configurator)
GlobalConnectionPool
public GlobalConnectionPool(PaloConfiguration configurator,
IConnectionFactory factory)
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