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
SQLException
public void initDatabase() throws SQLException
SQLException
public 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")SQLException
public void dropDatabase() throws SQLException
SQLException
public void dropDatabase(String scriptName) throws SQLException
scriptName
- the name of the script to use for drop (e.g. "base" or "versioning")SQLException
public KiWiConnection getConnection() throws SQLException
SQLException
- in case a new connection could not be establishedpublic Connection getJDBCConnection() throws SQLException
SQLException
public Connection getJDBCConnection(boolean maintenance) throws SQLException
SQLException
public void releaseJDBCConnection(Connection con) throws SQLException
con
- SQLException
public 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
SQLException
public boolean checkConsistency() throws SQLException
SQLException
public IDGenerator getIdGenerator()
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.