public class DataRepoPool extends Object implements tigase.db.DataRepository, tigase.db.DataSourcePool<tigase.db.DataRepository>
| Constructor and Description |
|---|
DataRepoPool() |
| Modifier and Type | Method and Description |
|---|---|
void |
addRepo(tigase.db.DataRepository repo) |
boolean |
automaticSchemaManagement() |
void |
checkConnectivity(Duration watchdogTime) |
boolean |
checkSchemaVersion(tigase.db.DataSourceAware<? extends tigase.db.DataSource> datasource,
boolean shutdownServer) |
boolean |
checkTable(String tableName) |
boolean |
checkTable(String tableName,
String createTableQuery) |
void |
commit() |
Statement |
createStatement(tigase.xmpp.jid.BareJID user_id) |
void |
endTransaction() |
tigase.db.DataRepository.dbTypes |
getDatabaseType() |
int |
getPoolSize() |
PreparedStatement |
getPreparedStatement(tigase.xmpp.jid.BareJID user_id,
String stIdKey) |
PreparedStatement |
getPreparedStatement(int hashCode,
String stIdKey) |
String |
getResourceUri() |
Optional<tigase.util.Version> |
getSchemaVersion(String component) |
void |
initialize(String resource_uri) |
void |
initPreparedStatement(String stIdKey,
String query) |
void |
initPreparedStatement(String stIdKey,
String query,
int autoGeneratedKeys) |
void |
release(Statement stmt,
ResultSet rs) |
void |
releaseRepoHandle(tigase.db.DataRepository repo) |
void |
rollback() |
void |
startTransaction() |
tigase.db.DataRepository |
takeRepoHandle(tigase.xmpp.jid.BareJID user_id) |
public void addRepo(tigase.db.DataRepository repo)
addRepo in interface tigase.db.RepositoryPool<tigase.db.DataRepository>public tigase.db.DataRepository takeRepoHandle(tigase.xmpp.jid.BareJID user_id)
takeRepoHandle in interface tigase.db.DataRepositorypublic void releaseRepoHandle(tigase.db.DataRepository repo)
releaseRepoHandle in interface tigase.db.DataRepositorypublic boolean automaticSchemaManagement()
automaticSchemaManagement in interface tigase.db.DataSourcepublic void checkConnectivity(Duration watchdogTime)
checkConnectivity in interface tigase.db.DataSourcepublic boolean checkSchemaVersion(tigase.db.DataSourceAware<? extends tigase.db.DataSource> datasource,
boolean shutdownServer)
checkSchemaVersion in interface tigase.db.DataSourcepublic Optional<tigase.util.Version> getSchemaVersion(String component)
getSchemaVersion in interface tigase.db.DataSourcepublic boolean checkTable(String tableName) throws SQLException
checkTable in interface tigase.db.DataRepositorySQLExceptionpublic boolean checkTable(String tableName, String createTableQuery) throws SQLException
checkTable in interface tigase.db.DataRepositorySQLExceptionpublic Statement createStatement(tigase.xmpp.jid.BareJID user_id) throws SQLException
createStatement in interface tigase.db.DataRepositorySQLExceptionpublic PreparedStatement getPreparedStatement(tigase.xmpp.jid.BareJID user_id, String stIdKey) throws SQLException
getPreparedStatement in interface tigase.db.DataRepositorySQLExceptionpublic PreparedStatement getPreparedStatement(int hashCode, String stIdKey) throws SQLException
getPreparedStatement in interface tigase.db.DataRepositorySQLExceptionpublic String getResourceUri()
getResourceUri in interface tigase.db.DataRepositorygetResourceUri in interface tigase.db.DataSourcepublic tigase.db.DataRepository.dbTypes getDatabaseType()
getDatabaseType in interface tigase.db.DataRepositorypublic void initPreparedStatement(String stIdKey, String query) throws SQLException
initPreparedStatement in interface tigase.db.DataRepositorySQLExceptionpublic void initPreparedStatement(String stIdKey, String query, int autoGeneratedKeys) throws SQLException
initPreparedStatement in interface tigase.db.DataRepositorySQLExceptionpublic void initialize(String resource_uri) throws tigase.db.DBInitException
initialize in interface tigase.db.DataSourcetigase.db.DBInitExceptionpublic void release(Statement stmt, ResultSet rs)
release in interface tigase.db.DataRepositorypublic void startTransaction()
throws SQLException
startTransaction in interface tigase.db.DataRepositorySQLExceptionpublic void commit()
throws SQLException
commit in interface tigase.db.DataRepositorySQLExceptionpublic void rollback()
throws SQLException
rollback in interface tigase.db.DataRepositorySQLExceptionpublic void endTransaction()
throws SQLException
endTransaction in interface tigase.db.DataRepositorySQLExceptionpublic int getPoolSize()
getPoolSize in interface tigase.db.DataRepositoryCopyright © 2018–2019 "Tigase, Inc.". All rights reserved.