org.aksw.commons.sparql.api.cache.extra
Class CacheCoreH2
java.lang.Object
org.aksw.commons.sparql.api.cache.extra.SqlDaoBase
org.aksw.commons.sparql.api.cache.extra.CacheCoreH2
- All Implemented Interfaces:
- CacheCore, SqlDao
public class CacheCoreH2
- extends SqlDaoBase
- implements CacheCore
The class is used to cache information about resources to a database.
Provides the connection to an H2 database in a light weight, configuration free
manner.
Note: Currently, either select ot construct has to be used (not both).
- Author:
- Jens Lehmann
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CacheCoreH2
public CacheCoreH2(Connection conn,
long lifespan)
throws SQLException
- Throws:
SQLException
create
public static CacheCoreH2 create(boolean autoServerMode,
String dbDir,
String dbName,
long lifespan)
throws ClassNotFoundException,
SQLException
- Loads the driver
- Throws:
ClassNotFoundException
SQLException
lookup
public CacheResource lookup(String queryString)
- Specified by:
lookup in interface CacheCore
_lookup
public CacheResource _lookup(String queryString)
throws SQLException
- Throws:
SQLException
write
public void write(String queryString,
InputStream in)
- Specified by:
write in interface CacheCore
_write
public void _write(String queryString,
InputStream in)
throws SQLException
- Throws:
SQLException
Copyright © 2011. All Rights Reserved.