public class OSHDBH2 extends OSHDBJdbc
connectionGEOM_PRECISION, GEOM_PRECISION_TO_LONG, MAXZOOM| Constructor and Description |
|---|
OSHDBH2(Connection conn) |
OSHDBH2(String databaseFile)
Opens a connection to oshdb data stored in a H2 database file.
|
| Modifier and Type | Method and Description |
|---|---|
OSHDBH2 |
inMemory(boolean cache)
Creates an in-memory copy of the current oshdb data (using a volatile in-memory H2 database),
for faster subsequent queries.
|
OSHDBH2 |
multithreading(boolean useMultithreading) |
OSHDBH2 |
prefix(String prefix)
Sets the "table/cache" name prefix to be used with this oshdb.
|
close, createMapReducer, getConnection, metadata, multithreadingclearTimeout, prefix, timeout, timeoutInMilliseconds, timeoutInMillisecondspublic OSHDBH2(String databaseFile) throws SQLException, ClassNotFoundException
databaseFile - the file name and path to the H2 database file. (the ".mv.db" file ending
of H2 should be omitted here)SQLException - if the database couldn't be openedClassNotFoundException - if the H2 database driver is not installed on the systempublic OSHDBH2(Connection conn) throws ClassNotFoundException, SQLException
ClassNotFoundExceptionSQLExceptionpublic OSHDBH2 prefix(String prefix)
OSHDBDatabasepublic OSHDBH2 multithreading(boolean useMultithreading)
multithreading in class OSHDBJdbcpublic OSHDBH2 inMemory(boolean cache) throws SQLException
The original database connection will be closed during this process.
Note that once the data has been cached in memory, this cannot be undone anymore by calling this method like `.inMemory(false)`.
cache - wether in-memory caching should be activated or notSQLException - if there's a problem while copying the data into memoryCopyright © 2016–2020 HeiGIT. All rights reserved.