Package org.apache.logging.log4j.couchdb
Class CouchDbConnection
java.lang.Object
org.apache.logging.log4j.core.appender.nosql.AbstractNoSqlConnection<Map<String,Object>,DefaultNoSqlObject>
org.apache.logging.log4j.couchdb.CouchDbConnection
- All Implemented Interfaces:
Closeable
,AutoCloseable
,NoSqlConnection<Map<String,
Object>, DefaultNoSqlObject>
public final class CouchDbConnection
extends AbstractNoSqlConnection<Map<String,Object>,DefaultNoSqlObject>
The Apache CouchDB implementation of
NoSqlConnection
.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
createList
(int length) Creates an array of the specified length typed to match theNoSqlObject
implementation appropriate for this provider.Instantiates and returns aNoSqlObject
instance whose properties can be configured before ultimate insertion viaNoSqlConnection.insertObject(NoSqlObject)
.void
insertObject
(NoSqlObject<Map<String, Object>> object) Inserts the given object into the underlying NoSQL database.Methods inherited from class org.apache.logging.log4j.core.appender.nosql.AbstractNoSqlConnection
close, isClosed
-
Field Details
-
client
private final org.lightcouch.CouchDbClient client
-
-
Constructor Details
-
CouchDbConnection
public CouchDbConnection(org.lightcouch.CouchDbClient client)
-
-
Method Details
-
createObject
Description copied from interface:NoSqlConnection
Instantiates and returns aNoSqlObject
instance whose properties can be configured before ultimate insertion viaNoSqlConnection.insertObject(NoSqlObject)
.- Returns:
- a new object.
- See Also:
-
createList
Description copied from interface:NoSqlConnection
Creates an array of the specified length typed to match theNoSqlObject
implementation appropriate for this provider.- Parameters:
length
- the length of the array to create.- Returns:
- a new array.
- See Also:
-
insertObject
Description copied from interface:NoSqlConnection
Inserts the given object into the underlying NoSQL database.- Parameters:
object
- The object to insert.
-
closeImpl
protected void closeImpl()- Specified by:
closeImpl
in classAbstractNoSqlConnection<Map<String,
Object>, DefaultNoSqlObject>
-