public abstract class DBAppenderBase<E>
extends ch.qos.logback.core.UnsynchronizedAppenderBase<E>
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
cnxSupportsBatchUpdates |
protected boolean |
cnxSupportsGetGeneratedKeys |
protected ConnectionSource |
connectionSource |
protected SQLDialect |
sqlDialect |
| Constructor and Description |
|---|
DBAppenderBase() |
| Modifier and Type | Method and Description |
|---|---|
void |
append(E eventObject) |
ConnectionSource |
getConnectionSource() |
protected abstract Method |
getGeneratedKeysMethod() |
protected abstract String |
getInsertSQL() |
protected abstract void |
secondarySubAppend(E eventObject,
Connection connection,
long eventId) |
protected long |
selectEventId(PreparedStatement insertStatement,
Connection connection) |
void |
setConnectionSource(ConnectionSource connectionSource) |
void |
start() |
void |
stop() |
protected abstract void |
subAppend(E eventObject,
Connection connection,
PreparedStatement statement) |
addFilter, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getName, isStarted, setName, toStringaddError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContextprotected ConnectionSource connectionSource
protected boolean cnxSupportsGetGeneratedKeys
protected boolean cnxSupportsBatchUpdates
protected SQLDialect sqlDialect
protected abstract Method getGeneratedKeysMethod()
protected abstract String getInsertSQL()
public void start()
start in interface ch.qos.logback.core.spi.LifeCyclestart in class ch.qos.logback.core.UnsynchronizedAppenderBase<E>public ConnectionSource getConnectionSource()
public void setConnectionSource(ConnectionSource connectionSource)
connectionSource - The connectionSource to set.public void append(E eventObject)
append in class ch.qos.logback.core.UnsynchronizedAppenderBase<E>protected abstract void subAppend(E eventObject, Connection connection, PreparedStatement statement) throws Throwable
Throwableprotected abstract void secondarySubAppend(E eventObject, Connection connection, long eventId) throws Throwable
Throwableprotected long selectEventId(PreparedStatement insertStatement, Connection connection) throws SQLException, InvocationTargetException
public void stop()
stop in interface ch.qos.logback.core.spi.LifeCyclestop in class ch.qos.logback.core.UnsynchronizedAppenderBase<E>Copyright © 2005–2022 QOS.ch. All rights reserved.