public class KiWiPersistence extends Object
| Constructor and Description |
|---|
KiWiPersistence(KiWiConfiguration configuration) |
KiWiPersistence(String name,
String jdbcUrl,
String db_user,
String db_password,
KiWiDialect dialect)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addNodeTableDependency(String tableName,
String columnName)
Add information about a dependency of a column in some table to the "nodes" table; this information
is used when cleaning up unreferenced deleted entries in the nodes table.
|
void |
addTripleTableDependency(String tableName,
String columnName)
Add information about a dependency of a column in some table to the "triples" table; this information
is used when cleaning up unreferenced deleted entries in the triples table.
|
boolean |
checkConsistency() |
void |
clearCache()
Remove all elements from the cache
|
void |
dropDatabase()
Remove all KiWi base tables from the SQL database.
|
void |
dropDatabase(String scriptName)
Remove all KiWi tables from the SQL database.
|
void |
garbageCollect() |
CacheManager |
getCacheManager() |
KiWiConfiguration |
getConfiguration() |
KiWiConnection |
getConnection()
Return a connection from the connection pool which already has the auto-commit disabled.
|
KiWiDialect |
getDialect() |
IDGenerator |
getIdGenerator() |
Connection |
getJDBCConnection()
Return a raw JDBC connection from the connection pool, which already has the auto-commit disabled.
|
Connection |
getJDBCConnection(boolean maintenance)
Return a raw JDBC connection from the connection pool, which already has the auto-commit disabled.
|
KiWiValueFactory |
getValueFactory() |
void |
initDatabase() |
void |
initDatabase(String scriptName,
String[] checkTables)
Initialise the database, creating or upgrading tables if they do not exist or are of the wrong version.
|
void |
initialise() |
void |
logPoolInfo() |
void |
releaseJDBCConnection(Connection con)
Release the JDBC connection passed as argument.
|
void |
setValueFactory(KiWiValueFactory valueFactory) |
void |
shutdown() |
@Deprecated public KiWiPersistence(String name, String jdbcUrl, String db_user, String db_password, KiWiDialect dialect)
public KiWiPersistence(KiWiConfiguration configuration)
public void initialise()
public KiWiDialect getDialect()
public CacheManager getCacheManager()
public void logPoolInfo()
throws SQLException
SQLExceptionpublic void initDatabase()
throws SQLException
SQLExceptionpublic void initDatabase(String scriptName, String[] checkTables) throws SQLException
scriptName - the name of the script to use for create or update (e.g. "base" or "versioning")SQLExceptionpublic void dropDatabase()
throws SQLException
SQLExceptionpublic void dropDatabase(String scriptName) throws SQLException
scriptName - the name of the script to use for drop (e.g. "base" or "versioning")SQLExceptionpublic KiWiConnection getConnection() throws SQLException
SQLException - in case a new connection could not be establishedpublic Connection getJDBCConnection() throws SQLException
SQLExceptionpublic Connection getJDBCConnection(boolean maintenance) throws SQLException
SQLExceptionpublic void releaseJDBCConnection(Connection con) throws SQLException
con - SQLExceptionpublic void addNodeTableDependency(String tableName, String columnName)
tableName - columnName - public void addTripleTableDependency(String tableName, String columnName)
tableName - columnName - public void shutdown()
public void clearCache()
public void setValueFactory(KiWiValueFactory valueFactory)
public KiWiValueFactory getValueFactory()
public KiWiConfiguration getConfiguration()
public void garbageCollect()
throws SQLException
SQLExceptionpublic boolean checkConsistency()
throws SQLException
SQLExceptionpublic IDGenerator getIdGenerator()
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.