PostgreSQLConnectionFactory

com.github.mauricio.async.db.postgresql.pool.PostgreSQLConnectionFactory
See thePostgreSQLConnectionFactory companion object
class PostgreSQLConnectionFactory(val configuration: Configuration, group: EventLoopGroup, executionContext: ExecutionContext) extends ObjectFactory[PostgreSQLConnection]

Object responsible for creating new connection instances.

Attributes

Companion
object
Graph
Supertypes
trait ObjectFactory[PostgreSQLConnection]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

Creates a valid object to be used in the pool. This method can block if necessary to make sure a correctly built is created.

Creates a valid object to be used in the pool. This method can block if necessary to make sure a correctly built is created.

Attributes

def destroy(item: PostgreSQLConnection): Unit

This method should "close" and release all resources acquired by the pooled object. This object will not be used anymore so any cleanup necessary to remove it from memory should be made in this method. Implementors should not raise an exception under any circumstances, the factory should log and clean up the exception itself.

This method should "close" and release all resources acquired by the pooled object. This object will not be used anymore so any cleanup necessary to remove it from memory should be made in this method. Implementors should not raise an exception under any circumstances, the factory should log and clean up the exception itself.

Attributes

override def test(item: PostgreSQLConnection): Try[PostgreSQLConnection]

Tests whether we can still send a SELECT 0 statement to the database.

Tests whether we can still send a SELECT 0 statement to the database.

Value parameters

item

an object produced by this pool

Attributes

Definition Classes
ObjectFactory

Validates by checking if the connection is still connected to the database or not.

Validates by checking if the connection is still connected to the database or not.

Value parameters

item

an object produced by this pool

Attributes

Concrete fields

val configuration: Configuration