public class CacheCoreH2 extends SqlDaoBase implements CacheCore, CacheBackend
idToQuery, queryToStmt| Constructor and Description |
|---|
CacheCoreH2(Connection conn,
long lifespan) |
| Modifier and Type | Method and Description |
|---|---|
CacheEntry |
_lookup(String service,
String queryString) |
static CacheCoreH2 |
create(boolean autoServerMode,
String dbDir,
String dbName,
long lifespan)
Loads the driver
|
static CacheBackend |
create(boolean autoServerMode,
String dbDir,
String dbName,
long lifespan,
boolean useCompression) |
static CacheCoreH2 |
create(String dbName) |
static CacheCoreH2 |
create(String dbName,
long lifespan) |
static CacheBackend |
create(String dbName,
long lifespan,
boolean useCompression) |
String |
createHashRoot(String service,
String queryString) |
Iterator<CacheEntryImpl> |
iterator()
Note: Do not close the InputStream provider on the cache entries
as this closes the underlying result set.
|
CacheEntry |
lookup(String queryString) |
CacheEntry |
lookup(String service,
String queryString) |
void |
write(String queryString,
InputStream in) |
void |
write(String service,
String queryString,
InputStream in) |
execute, executeList, executeQuery, getConnection, setConnection, setPreparedStatementpublic CacheCoreH2(Connection conn, long lifespan) throws SQLException
SQLExceptionpublic CacheEntry lookup(String queryString)
public void write(String queryString, InputStream in)
public static CacheCoreH2 create(String dbName) throws ClassNotFoundException, SQLException
ClassNotFoundExceptionSQLExceptionpublic static CacheCoreH2 create(String dbName, long lifespan) throws ClassNotFoundException, SQLException
ClassNotFoundExceptionSQLExceptionpublic static CacheCoreH2 create(boolean autoServerMode, String dbDir, String dbName, long lifespan) throws ClassNotFoundException, SQLException
ClassNotFoundExceptionSQLExceptionpublic static CacheBackend create(boolean autoServerMode, String dbDir, String dbName, long lifespan, boolean useCompression) throws ClassNotFoundException, SQLException
ClassNotFoundExceptionSQLExceptionpublic static CacheBackend create(String dbName, long lifespan, boolean useCompression) throws ClassNotFoundException, SQLException
ClassNotFoundExceptionSQLExceptionpublic Iterator<CacheEntryImpl> iterator() throws SQLException
SQLExceptionpublic CacheEntry lookup(String service, String queryString)
lookup in interface CacheBackendpublic CacheEntry _lookup(String service, String queryString) throws SQLException
SQLExceptionpublic void write(String service, String queryString, InputStream in)
write in interface CacheBackendCopyright © 2014. All Rights Reserved.