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 voidcreateList(int length) Creates an array of the specified length typed to match theNoSqlObjectimplementation appropriate for this provider.Instantiates and returns aNoSqlObjectinstance whose properties can be configured before ultimate insertion viaNoSqlConnection.insertObject(NoSqlObject).voidinsertObject(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:NoSqlConnectionInstantiates and returns aNoSqlObjectinstance whose properties can be configured before ultimate insertion viaNoSqlConnection.insertObject(NoSqlObject).- Returns:
- a new object.
- See Also:
-
createList
Description copied from interface:NoSqlConnectionCreates an array of the specified length typed to match theNoSqlObjectimplementation appropriate for this provider.- Parameters:
length- the length of the array to create.- Returns:
- a new array.
- See Also:
-
insertObject
Description copied from interface:NoSqlConnectionInserts the given object into the underlying NoSQL database.- Parameters:
object- The object to insert.
-
closeImpl
protected void closeImpl()- Specified by:
closeImplin classAbstractNoSqlConnection<Map<String,Object>, DefaultNoSqlObject>
-