|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openanzo.server.repository.rdb.RepositoryConnectionPool
public class RepositoryConnectionPool
Manages a pool of RepositoryConnection objects. Database connections and SQL prepared statements are allocated for each RepositoryConnection according to the ModelServiceProperties.
| Constructor Summary | |
|---|---|
RepositoryConnectionPool(java.util.Properties properties)
Create new ContainerConnectionPool |
|
| Method Summary | |
|---|---|
RepositoryConnection |
acquireRepositoryConnection(int type)
Get a repositoryConnection from the pool |
void |
clearNodeCaches()
Clear the caches in all connections |
void |
close()
Close the service |
int |
decrementUsageCount()
Decrement the usage count for the pool |
CacheProvider |
getCacheProvider()
|
java.lang.String |
getDatabaseDriver()
Get the database driver's class name |
java.lang.String |
getDatabasePassword()
Get the password for the database connection |
java.lang.String |
getDatabaseType()
Get the type of database connection |
java.lang.String |
getDatabaseUrl()
Get the database JDBC URL |
java.lang.String |
getDatabaseUserName()
Get the username for the database connection |
boolean |
getIsStarted()
Determine if the service is started |
int |
getQueryConnectionInactiveSize()
Get the number of inactive connections in the QUERY connection pool |
int |
getQueryConnectionInUseSize()
Get the number of connections currently in-use from the QUERY connection pool |
int |
getQueryConnectionMaxPoolSize()
Get the max size of the QUERY connection pool |
int |
getQueryConnectionPoolMaxIdle()
Get the max number of idle connections in the QUERY connection pool |
long |
getQueryConnectionPoolMaxWaitTime()
Get max time to wait for a connection from the QUERY connection pool |
long |
getQueryConnectionPoolMinIdleTime()
Get minimum time to wait before an idle connection from the QUERY connection pool is destroyed |
int |
getReadConnectionInactiveSize()
Get the number of inactive connections in the READ connection pool |
int |
getReadConnectionInUseSize()
Get the number of connections currently in-use from the READ connection pool |
int |
getReadConnectionMaxPoolSize()
Get the max size of the READ connection pool |
int |
getReadConnectionPoolMaxIdle()
Get the max number of idle connections in the READ connection pool |
long |
getReadConnectionPoolMaxWaitTime()
Get max time to wait for a connection from the READ connection pool |
long |
getReadConnectionPoolMinIdleTime()
Get minimum time to wait before an idle connection from the READ connection pool is destroyed |
int |
getUsageCount()
Get the current usage count |
int |
getWriteConnectionInactiveSize()
Get the number of inactive connections in the WRITE connection pool |
int |
getWriteConnectionInUseSize()
Get the number of connections currently in-use from the WRITE connection pool |
int |
getWriteConnectionMaxPoolSize()
Get the max size of the WRITE connection pool |
int |
getWriteConnectionPoolMaxIdle()
Get the max number of idle connections in the WRITE connection pool |
long |
getWriteConnectionPoolMaxWaitTime()
Get max time to wait for a connection from the WRITE connection pool |
long |
getWriteConnectionPoolMinIdleTime()
Get minimum time to wait before an idle connection from the WRITE connection pool is destroyed |
int |
incrementUsageCount()
Increment the usage count for the pool |
void |
prepareReleaseRepositoryConnections(int connectionsToPrepare)
Acquire and release a number of rw and ro connection |
void |
purgeAndReset()
Function to purge all connections in pool, and restart using current configuration values |
void |
registerMBean(javax.management.MBeanServer mbs,
javax.management.ObjectName parentObjectName)
Register the service with the server's jmx server |
void |
registerResetListener(IResetListener listener)
Register IResetListener with ContainerConnectionPool |
void |
releaseRepositoryConnection(RepositoryConnection connection)
Release a repositoryConnection from the pool |
void |
reset(java.lang.Long id)
Notify all listeners about a database reset |
void |
setDatabaseDriver(java.lang.String dbDriver)
Set the database driver's class name |
void |
setDatabasePassword(java.lang.String password)
Set the password for the database connection |
void |
setDatabaseType(java.lang.String dbType)
Set the type of database connection |
void |
setDatabaseUrl(java.lang.String jdbcUrl)
Set the database JDBC URL |
void |
setDatabaseUserName(java.lang.String userName)
Set the username for the database connection |
void |
setLiteralIndexer(LiteralIndexer literalIndexer)
Set the literal index which this pool of connections can use |
void |
setQueryConnectionMaxPoolSize(int size)
Set the max size of the QUERY connection pool |
void |
setQueryConnectionPoolMaxIdle(int max)
Set the max number of idle connections in the QUERY connection pool |
void |
setQueryConnectionPoolMaxWaitTime(long maxWait)
Get set the max time to wait for a connection from the QUERY connection pool |
void |
setQueryConnectionPoolMinIdleTime(long minWait)
Set minimum time to wait before an idle connection from the QUERY connection pool is destroyed |
void |
setReadConnectionMaxPoolSize(int size)
Set the max size of the READ connection pool |
void |
setReadConnectionPoolMaxIdle(int max)
Set the max number of idle connections in the READ connection pool |
void |
setReadConnectionPoolMaxWaitTime(long maxWait)
Get set the max time to wait for a connection from the READ connection pool |
void |
setReadConnectionPoolMinIdleTime(long minWait)
Set minimum time to wait before an idle connection from the READ connection pool is destroyed |
void |
setWriteConnectionMaxPoolSize(int size)
Set the max size of the WRITE connection pool |
void |
setWriteConnectionPoolMaxIdle(int max)
Set the max number of idle connections in the WRITE connection pool |
void |
setWriteConnectionPoolMaxWaitTime(long maxWait)
Get set the max time to wait for a connection from the WRITE connection pool |
void |
setWriteConnectionPoolMinIdleTime(long minWait)
Set minimum time to wait before an idle connection from the WRITE connection pool is destroyed |
void |
start()
Start the service |
void |
stop()
Stop the service |
void |
unregisterResetListener(IResetListener listener)
Unregister IResetListener from ContainerConnectionPool |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RepositoryConnectionPool(java.util.Properties properties)
properties - Configuration properties| Method Detail |
|---|
public void setLiteralIndexer(LiteralIndexer literalIndexer)
literalIndexer -
public void start()
throws AnzoException
IServerService
start in interface IServerServiceAnzoException
public boolean getIsStarted()
throws AnzoException
IServerService
getIsStarted in interface IServerServiceAnzoExceptionpublic void stop()
IServerService
stop in interface IServerService
public void registerMBean(javax.management.MBeanServer mbs,
javax.management.ObjectName parentObjectName)
IServerService
registerMBean in interface IServerServicembs - the jmx serverparentObjectName - the name under which this object will be registeredpublic void clearNodeCaches()
public void reset(java.lang.Long id)
id - of server being reset
public void prepareReleaseRepositoryConnections(int connectionsToPrepare)
throws AnzoException
connectionsToPrepare - Number of connections to prepare and release
AnzoException
public RepositoryConnection acquireRepositoryConnection(int type)
throws AnzoException
type - Type of RepositoryConnection to acquire
AnzoExceptionpublic void releaseRepositoryConnection(RepositoryConnection connection)
connection - RepositoryConnection to releasepublic void registerResetListener(IResetListener listener)
listener - Listener to registerpublic void unregisterResetListener(IResetListener listener)
listener - Listener to unregisterpublic int incrementUsageCount()
public int decrementUsageCount()
public int getUsageCount()
public void close()
IServerService
close in interface IServerServicepublic void purgeAndReset()
RepositoryConnectionPoolMBean
purgeAndReset in interface RepositoryConnectionPoolMBeanpublic int getQueryConnectionInUseSize()
RepositoryConnectionPoolMBean
getQueryConnectionInUseSize in interface RepositoryConnectionPoolMBeanpublic int getQueryConnectionInactiveSize()
RepositoryConnectionPoolMBean
getQueryConnectionInactiveSize in interface RepositoryConnectionPoolMBeanpublic int getQueryConnectionMaxPoolSize()
RepositoryConnectionPoolMBean
getQueryConnectionMaxPoolSize in interface RepositoryConnectionPoolMBeanpublic int getReadConnectionInUseSize()
RepositoryConnectionPoolMBean
getReadConnectionInUseSize in interface RepositoryConnectionPoolMBeanpublic int getReadConnectionInactiveSize()
RepositoryConnectionPoolMBean
getReadConnectionInactiveSize in interface RepositoryConnectionPoolMBeanpublic int getReadConnectionMaxPoolSize()
RepositoryConnectionPoolMBean
getReadConnectionMaxPoolSize in interface RepositoryConnectionPoolMBeanpublic int getWriteConnectionInUseSize()
RepositoryConnectionPoolMBean
getWriteConnectionInUseSize in interface RepositoryConnectionPoolMBeanpublic int getWriteConnectionInactiveSize()
RepositoryConnectionPoolMBean
getWriteConnectionInactiveSize in interface RepositoryConnectionPoolMBeanpublic int getWriteConnectionMaxPoolSize()
RepositoryConnectionPoolMBean
getWriteConnectionMaxPoolSize in interface RepositoryConnectionPoolMBeanpublic void setQueryConnectionMaxPoolSize(int size)
RepositoryConnectionPoolMBean
setQueryConnectionMaxPoolSize in interface RepositoryConnectionPoolMBeansize - the max size of the QUERY connection poolpublic void setReadConnectionMaxPoolSize(int size)
RepositoryConnectionPoolMBean
setReadConnectionMaxPoolSize in interface RepositoryConnectionPoolMBeansize - the max size of the READ connection poolpublic void setWriteConnectionMaxPoolSize(int size)
RepositoryConnectionPoolMBean
setWriteConnectionMaxPoolSize in interface RepositoryConnectionPoolMBeansize - the max size of the WRITE connection poolpublic long getQueryConnectionPoolMaxWaitTime()
RepositoryConnectionPoolMBean
getQueryConnectionPoolMaxWaitTime in interface RepositoryConnectionPoolMBeanpublic long getReadConnectionPoolMaxWaitTime()
RepositoryConnectionPoolMBean
getReadConnectionPoolMaxWaitTime in interface RepositoryConnectionPoolMBeanpublic long getWriteConnectionPoolMaxWaitTime()
RepositoryConnectionPoolMBean
getWriteConnectionPoolMaxWaitTime in interface RepositoryConnectionPoolMBeanpublic void setQueryConnectionPoolMaxWaitTime(long maxWait)
RepositoryConnectionPoolMBean
setQueryConnectionPoolMaxWaitTime in interface RepositoryConnectionPoolMBeanmaxWait - max time to wait for a connection from the QUERY connection poolpublic void setReadConnectionPoolMaxWaitTime(long maxWait)
RepositoryConnectionPoolMBean
setReadConnectionPoolMaxWaitTime in interface RepositoryConnectionPoolMBeanmaxWait - max time to wait for a connection from the READ connection poolpublic void setWriteConnectionPoolMaxWaitTime(long maxWait)
RepositoryConnectionPoolMBean
setWriteConnectionPoolMaxWaitTime in interface RepositoryConnectionPoolMBeanmaxWait - max time to wait for a connection from the WRITE connection poolpublic int getQueryConnectionPoolMaxIdle()
RepositoryConnectionPoolMBean
getQueryConnectionPoolMaxIdle in interface RepositoryConnectionPoolMBeanpublic long getQueryConnectionPoolMinIdleTime()
RepositoryConnectionPoolMBean
getQueryConnectionPoolMinIdleTime in interface RepositoryConnectionPoolMBeanpublic int getReadConnectionPoolMaxIdle()
RepositoryConnectionPoolMBean
getReadConnectionPoolMaxIdle in interface RepositoryConnectionPoolMBeanpublic long getReadConnectionPoolMinIdleTime()
RepositoryConnectionPoolMBean
getReadConnectionPoolMinIdleTime in interface RepositoryConnectionPoolMBeanpublic int getWriteConnectionPoolMaxIdle()
RepositoryConnectionPoolMBean
getWriteConnectionPoolMaxIdle in interface RepositoryConnectionPoolMBeanpublic long getWriteConnectionPoolMinIdleTime()
RepositoryConnectionPoolMBean
getWriteConnectionPoolMinIdleTime in interface RepositoryConnectionPoolMBeanpublic void setQueryConnectionPoolMaxIdle(int max)
RepositoryConnectionPoolMBean
setQueryConnectionPoolMaxIdle in interface RepositoryConnectionPoolMBeanmax - the max number of idle connections in the READ connection poolpublic void setQueryConnectionPoolMinIdleTime(long minWait)
RepositoryConnectionPoolMBean
setQueryConnectionPoolMinIdleTime in interface RepositoryConnectionPoolMBeanminWait - minimum time to wait before an idle connection from the QUERY connection pool is destroyedpublic void setReadConnectionPoolMaxIdle(int max)
RepositoryConnectionPoolMBean
setReadConnectionPoolMaxIdle in interface RepositoryConnectionPoolMBeanmax - the max number of idle connections in the READ connection poolpublic void setReadConnectionPoolMinIdleTime(long minWait)
RepositoryConnectionPoolMBean
setReadConnectionPoolMinIdleTime in interface RepositoryConnectionPoolMBeanminWait - minimum time to wait before an idle connection from the READ connection pool is destroyedpublic void setWriteConnectionPoolMaxIdle(int max)
RepositoryConnectionPoolMBean
setWriteConnectionPoolMaxIdle in interface RepositoryConnectionPoolMBeanmax - the max number of idle connections in the WRITE connection poolpublic void setWriteConnectionPoolMinIdleTime(long minWait)
RepositoryConnectionPoolMBean
setWriteConnectionPoolMinIdleTime in interface RepositoryConnectionPoolMBeanminWait - minimum time to wait before an idle connection from the WRITE connection pool is destroyedpublic java.lang.String getDatabaseUrl()
RepositoryConnectionPoolMBean
getDatabaseUrl in interface RepositoryConnectionPoolMBeanpublic java.lang.String getDatabaseUserName()
RepositoryConnectionPoolMBean
getDatabaseUserName in interface RepositoryConnectionPoolMBeanpublic void setDatabaseUrl(java.lang.String jdbcUrl)
RepositoryConnectionPoolMBean
setDatabaseUrl in interface RepositoryConnectionPoolMBeanjdbcUrl - the database JDBC URLpublic void setDatabaseUserName(java.lang.String userName)
RepositoryConnectionPoolMBean
setDatabaseUserName in interface RepositoryConnectionPoolMBeanuserName - the username for the database connectionpublic java.lang.String getDatabasePassword()
RepositoryConnectionPoolMBean
getDatabasePassword in interface RepositoryConnectionPoolMBeanpublic void setDatabasePassword(java.lang.String password)
RepositoryConnectionPoolMBean
setDatabasePassword in interface RepositoryConnectionPoolMBeanpassword - the password for the database connectionpublic java.lang.String getDatabaseDriver()
RepositoryConnectionPoolMBean
getDatabaseDriver in interface RepositoryConnectionPoolMBeanpublic void setDatabaseDriver(java.lang.String dbDriver)
RepositoryConnectionPoolMBean
setDatabaseDriver in interface RepositoryConnectionPoolMBeandbDriver - the database driver's class namepublic java.lang.String getDatabaseType()
RepositoryConnectionPoolMBean
getDatabaseType in interface RepositoryConnectionPoolMBeanpublic void setDatabaseType(java.lang.String dbType)
RepositoryConnectionPoolMBean
setDatabaseType in interface RepositoryConnectionPoolMBeandbType - the type of database connectionpublic CacheProvider getCacheProvider()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||