|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectArcSDEConnectionPool
SessionPool
public class 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
Deprecated. default number of connections a pool creates at first population |
static int |
DEFAULT_MAX_CONNECTIONS
Deprecated. default number of maximun allowable connections a pool can hold |
static int |
DEFAULT_MAX_WAIT_TIME
Deprecated. |
protected static Level |
INFO_LOG_LEVEL
Deprecated. DOCUMENT ME! |
Constructor Summary | |
---|---|
protected |
ArcSDEConnectionPool(ArcSDEConnectionConfig config)
Deprecated. Creates a new SdeConnectionPool object with the connection parameters holded by config |
Method Summary | |
---|---|
void |
close()
Deprecated. closes all connections in this pool |
protected void |
finalize()
Deprecated. Ensures proper closure of connection pool at this object's finalization stage. |
int |
getAvailableCount()
Deprecated. TODO: Document this method! |
List |
getAvailableLayerNames()
Deprecated. Gets the list of available layer names on the database |
ArcSDEConnectionConfig |
getConfig()
Deprecated. DOCUMENT ME! |
ArcSDEPooledConnection |
getConnection()
Deprecated. DOCUMENT ME! |
int |
getInUseCount()
Deprecated. TODO: Document this method! |
int |
getPoolSize()
Deprecated. returns the number of actual connections holded by this connection pool. |
boolean |
isClosed()
Deprecated. |
void |
markConnectionAsFailed(ArcSDEPooledConnection conn)
Deprecated. Sometimes (and largely without reason) ArcSDEPooledConnections (really their underlying SeConnection objects) just poop out. |
String |
toString()
Deprecated. |
Methods inherited from class Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final 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(ArcSDEConnectionConfig 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!
NullPointerException
- DOCUMENT ME!Method Detail |
---|
public int getPoolSize()
public void close()
public boolean isClosed()
protected void finalize()
finalize
in class Object
public int getAvailableCount()
public int getInUseCount()
public ArcSDEPooledConnection getConnection() throws DataSourceException, UnavailableConnectionException
DataSourceException
- DOCUMENT ME!
UnavailableConnectionException
IllegalStateException
- DOCUMENT ME!public void markConnectionAsFailed(ArcSDEPooledConnection conn)
conn
- public List getAvailableLayerNames() throws DataSourceException
List<String>
with the registered featureclasses on the ArcSDE
database
DataSourceException
public ArcSDEConnectionConfig getConfig()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |