W - A type parameter for reassuring the compiler that all operations are using the same NoSqlObject.Flushable, AutoCloseablepublic final class NoSqlDatabaseManager<W> extends AbstractDatabaseManager
AbstractDatabaseManager implementation for all NoSQL databases.AbstractDatabaseManager.AbstractFactoryDatacount, LOGGER| Modifier and Type | Method | Description |
|---|---|---|
protected boolean |
commitAndClose() |
Commits any active transaction (if applicable) and disconnects from the database (returns the connection to the
connection pool).
|
protected void |
connectAndStart() |
Connects to the database and starts a transaction (if applicable).
|
static NoSqlDatabaseManager<?> |
getNoSqlDatabaseManager(String name,
int bufferSize,
NoSqlProvider<?> provider) |
Creates a NoSQL manager for use within the
NoSqlAppender, or returns a suitable one if it already exists. |
protected boolean |
shutdownInternal() |
Implementations should implement this method to perform any proprietary disconnection / shutdown operations.
|
protected void |
startupInternal() |
Implementations should implement this method to perform any proprietary startup operations.
|
protected void |
writeInternal(LogEvent event) |
Performs the actual writing of the event in an implementation-specific way.
|
flush, getManager, isRunning, releaseSub, shutdown, startup, toString, writeclose, getContentFormat, getCount, getLoggerContext, getName, hasManager, log, logDebug, logError, logWarn, narrow, release, stop, updateDataprotected void startupInternal()
AbstractDatabaseManagerstartupInternal in class AbstractDatabaseManagerprotected boolean shutdownInternal()
AbstractDatabaseManagerAbstractDatabaseManager.startupInternal(). It is safe to throw any exceptions from this method. This method does not
necessarily disconnect from the database for the same reasons outlined in AbstractDatabaseManager.startupInternal().shutdownInternal in class AbstractDatabaseManagerprotected void connectAndStart()
AbstractDatabaseManagerAbstractDatabaseManager.writeInternal(org.apache.logging.log4j.core.LogEvent). With buffering disabled, this is
called immediately before every invocation of AbstractDatabaseManager.writeInternal(org.apache.logging.log4j.core.LogEvent).connectAndStart in class AbstractDatabaseManagerprotected void writeInternal(LogEvent event)
AbstractDatabaseManagerAbstractDatabaseManager.write(LogEvent) if buffering is off, or from AbstractDatabaseManager.flush() if the buffer has reached its limit.writeInternal in class AbstractDatabaseManagerevent - The event to write to the database.protected boolean commitAndClose()
AbstractDatabaseManagerAbstractDatabaseManager.writeInternal(org.apache.logging.log4j.core.LogEvent). With buffering disabled, this is called immediately after every invocation of
AbstractDatabaseManager.writeInternal(org.apache.logging.log4j.core.LogEvent).commitAndClose in class AbstractDatabaseManagerpublic static NoSqlDatabaseManager<?> getNoSqlDatabaseManager(String name, int bufferSize, NoSqlProvider<?> provider)
NoSqlAppender, or returns a suitable one if it already exists.name - The name of the manager, which should include connection details and hashed passwords where possible.bufferSize - The size of the log event buffer.provider - A provider instance which will be used to obtain connections to the chosen NoSQL database.Copyright © 1999-2018. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.