org.apache.logging.log4j.nosql.appender
Interface NoSqlProvider<C extends NoSqlConnection<?,? extends NoSqlObject<?>>>

Type Parameters:
C - Specifies which implementation of NoSqlConnection this provider provides.
All Known Implementing Classes:
CouchDbProvider, MongoDbProvider

public interface NoSqlProvider<C extends NoSqlConnection<?,? extends NoSqlObject<?>>>

Implementations of this class are plugins for configuring the NoSqlAppender with the proper provider (MongoDB, etc.).


Method Summary
 C getConnection()
          Obtains a connection from this provider.
 String toString()
          All implementations must override Object.toString() to provide information about the provider configuration (obscuring passwords with one-way hashes).
 

Method Detail

getConnection

C getConnection()
Obtains a connection from this provider. The concept of a connection in this case is not strictly an active duplex UDP or TCP connection to the underlying database. It can be thought of more as a gateway, a path for inserting objects that may use a persistent connection or may use HTTP web service calls, etc.

Where applicable, this method should return a connection from the connection pool as opposed to opening a brand new connection every time.

Returns:
a connection that can be used to create and persist objects to this database.
See Also:
NoSqlConnection

toString

String toString()
All implementations must override Object.toString() to provide information about the provider configuration (obscuring passwords with one-way hashes).

Overrides:
toString in class Object
Returns:
the string representation of this NoSQL provider.


Copyright © 1999-2015 Apache Software Foundation. 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.