public class TstStatefulPoolableConnector extends TstAbstractConnector implements PoolableConnector
config
Constructor and Description |
---|
TstStatefulPoolableConnector() |
Modifier and Type | Method and Description |
---|---|
void |
checkAlive()
Checks if the connector is still alive.
|
void |
dispose()
Dispose of any resources the
Connector uses. |
Configuration |
getConfiguration()
Return the configuration that was passed to
Connector.init(Configuration) . |
void |
init(Configuration cfg)
Initialize the connector with its configuration.
|
create, createFilterTranslator, delete, executeQuery, getLatestSyncToken, sync
public void init(Configuration cfg)
Connector
Connector
this would include the database URL, password, and
user.init
in interface Connector
init
in class TstAbstractConnector
cfg
- instance of the Configuration
object implemented by
the Connector
developer and populated with information
in order to initialize the Connector
.public Configuration getConfiguration()
Connector
Connector.init(Configuration)
.getConfiguration
in interface Connector
Connector.init(Configuration)
.public void dispose()
Connector
Connector
uses.public void checkAlive()
PoolableConnector
A connector can spend a large amount of time in the pool before being used. This method is intended to check if the connector is alive and operations can be invoked on it (for instance, an implementation would check that the connector's physical connection to the resource has not timed out).
The major difference between this method and TestOp.test()
is
that this method must do only the minimum that is necessary to check that
the connector is still alive. TestOp.test()
does a more
thorough check of the environment specified in the Configuration, and can
therefore be much slower.
This method can be called often. Implementations should do their best to keep this method fast.
checkAlive
in interface PoolableConnector
Copyright © 2022. All rights reserved.