|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.data.arcsde.ArcSDEConnectionPool
Maintains SeConnection
's for a single set of connection
properties (for instance: by server, port, user and password) in a pooled
way
Since sde connections are not jdbc connections, I can't use Sean's excellent connection pool. So I'll borrow most of it.
This connection pool is configurable in the sense that some parameters can be passed to establish the pooling policy. To pass parameters to the connection pool, you should set some properties in the parameters Map passed to SdeDataStoreFactory.createDataStore, wich will invoke SdeConnectionPoolFactory to get the SDE instance's pool singleton. That instance singleton will be created with the preferences passed the first time createDataStore is called for a given SDE instance/user, if subsecuent calls change that preferences, they will be ignored.
The expected optional parameters that you can set up in the argument Map for createDataStore are:
Field Summary | |
static int |
DEFAULT_CONNECTIONS
default number of connections a pool creates at first population |
static int |
DEFAULT_MAX_CONNECTIONS
default number of maximun allowable connections a pool can hold |
static int |
DEFAULT_MAX_WAIT_TIME
|
protected static java.util.logging.Level |
INFO_LOG_LEVEL
DOCUMENT ME! |
protected static java.util.logging.Logger |
LOGGER
package's logger |
Constructor Summary | |
protected |
ArcSDEConnectionPool(ConnectionConfig config)
Creates a new SdeConnectionPool object with the connection parameters holded by config |
Method Summary | |
void |
close()
closes all connections in this pool |
int |
getAvailableCount()
TODO: Document this method! |
java.util.List |
getAvailableLayerNames()
Gets the list of available layer names on the database |
ConnectionConfig |
getConfig()
DOCUMENT ME! |
org.geotools.data.arcsde.PooledConnection |
getConnection()
DOCUMENT ME! |
int |
getInUseCount()
TODO: Document this method! |
int |
getPoolSize()
returns the number of actual connections holded by this connection pool. |
com.esri.sde.sdk.client.SeLayer |
getSdeLayer(com.esri.sde.sdk.client.SeConnection conn,
java.lang.String typeName)
DOCUMENT ME! |
com.esri.sde.sdk.client.SeLayer |
getSdeLayer(java.lang.String typeName)
|
com.esri.sde.sdk.client.SeTable |
getSdeTable(com.esri.sde.sdk.client.SeConnection conn,
java.lang.String tableName)
DOCUMENT ME! |
com.esri.sde.sdk.client.SeTable |
getSdeTable(java.lang.String tableName)
|
boolean |
isClosed()
DOCUMENT ME! |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final java.util.logging.Logger LOGGER
protected static final java.util.logging.Level INFO_LOG_LEVEL
public static final int DEFAULT_CONNECTIONS
public static final int DEFAULT_MAX_CONNECTIONS
public static final int DEFAULT_MAX_WAIT_TIME
Constructor Detail |
protected ArcSDEConnectionPool(ConnectionConfig config) throws DataSourceException
config
config
- holds connection options such as server, user and
password, as well as tuning options as maximun number of
connections allowed
DataSourceException
- DOCUMENT ME!
java.lang.NullPointerException
- DOCUMENT ME!Method Detail |
public int getPoolSize()
public void close()
public int getAvailableCount()
public int getInUseCount()
public org.geotools.data.arcsde.PooledConnection getConnection() throws DataSourceException, UnavailableConnectionException
DataSourceException
- DOCUMENT ME!
UnavailableConnectionException
java.lang.IllegalStateException
- DOCUMENT ME!public com.esri.sde.sdk.client.SeTable getSdeTable(java.lang.String tableName) throws DataSourceException
DataSourceException
public com.esri.sde.sdk.client.SeTable getSdeTable(com.esri.sde.sdk.client.SeConnection conn, java.lang.String tableName) throws DataSourceException
tableName
- DOCUMENT ME!
DataSourceException
- DOCUMENT ME!public com.esri.sde.sdk.client.SeLayer getSdeLayer(java.lang.String typeName) throws java.util.NoSuchElementException, java.io.IOException
java.util.NoSuchElementException
java.io.IOException
public com.esri.sde.sdk.client.SeLayer getSdeLayer(com.esri.sde.sdk.client.SeConnection conn, java.lang.String typeName) throws java.util.NoSuchElementException, java.io.IOException
typeName
- DOCUMENT ME!
java.util.NoSuchElementException
- DOCUMENT ME!
java.io.IOException
- DOCUMENT ME!public java.util.List getAvailableLayerNames() throws DataSourceException
List<String>
with the registered
featureclasses on the ArcSDE database
DataSourceException
public boolean isClosed()
public ConnectionConfig getConfig()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |