public abstract class AbstractJdbcStorageDao extends BaseStorageDao
accessor
Constructor and Description |
---|
AbstractJdbcStorageDao(org.osgi.service.jdbc.DataSourceFactory dataSourceFactory,
Properties properties,
boolean usePool,
com.google.common.collect.Interner<String> stringInterner) |
Modifier and Type | Method and Description |
---|---|
void |
cleanupArchive() |
protected int |
cleanupArchive(int days)
Cleanup the archive
|
protected String |
getDeleteAttributesSql() |
protected String |
getInsertAttributesSql() |
protected String |
intern(String string) |
Event |
loadEvent(UUID id) |
protected void |
logSQLError(SQLException e) |
protected void |
performStoreEvent(Event event,
ConnectionContext connectionContext) |
ResultSet |
queryEvents(Filter filter)
Get an open result result for a filter
|
void |
storeEvent(Event event) |
protected void |
storeReplicationEvent(Event event,
Connection con) |
boolean |
toEventList(ResultSet rs,
Collection<Event> events,
boolean isBeforeFirst,
long count) |
clip, closeConnection, closeStatement, createConnection, dispose, getAccessor, getCleanupDays, getInstance, getMaxLength, getSchema, setInstance, setMaxLength, setSchema, updateComment
public AbstractJdbcStorageDao(org.osgi.service.jdbc.DataSourceFactory dataSourceFactory, Properties properties, boolean usePool, com.google.common.collect.Interner<String> stringInterner) throws SQLException
SQLException
protected void storeReplicationEvent(Event event, Connection con) throws Exception
Exception
protected void logSQLError(SQLException e)
public Event loadEvent(UUID id) throws SQLException
SQLException
public ResultSet queryEvents(Filter filter) throws SQLException, NotSupportedException
The caller has to close the result set and the connection
SQLException
NotSupportedException
public boolean toEventList(ResultSet rs, Collection<Event> events, boolean isBeforeFirst, long count) throws SQLException
SQLException
protected String getDeleteAttributesSql()
getDeleteAttributesSql
in class BaseStorageDao
protected String getInsertAttributesSql()
getInsertAttributesSql
in class BaseStorageDao
public void cleanupArchive()
protected int cleanupArchive(int days) throws Exception
days
- days in the past that should remain in the archivedayswas negative or zero.
Exception
protected void performStoreEvent(Event event, ConnectionContext connectionContext) throws SQLException, Exception
SQLException
Exception