com.github.mauricio.async.db.mysql.pool

MySQLConnectionFactory

class MySQLConnectionFactory extends ObjectFactory[MySQLConnection]

Connection pool factory for com.github.mauricio.async.db.mysql.MySQLConnection objects.

Linear Supertypes
ObjectFactory[MySQLConnection], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MySQLConnectionFactory
  2. ObjectFactory
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MySQLConnectionFactory(configuration: Configuration)

    configuration

    a valid configuration to connect to a MySQL server.

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def create: MySQLConnection

    Creates a valid object to be used in the pool.

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

    returns

    Definition Classes
    MySQLConnectionFactory → ObjectFactory
  9. def destroy(item: MySQLConnection): Unit

    This method should "close" and release all resources acquired by the pooled object.

    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.

    item

    Definition Classes
    MySQLConnectionFactory → ObjectFactory
  10. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  20. def test(item: MySQLConnection): Try[MySQLConnection]

    Does a full test on the given object making sure it's still valid.

    Does a full test on the given object making sure it's still valid. Different than validate, that's called whenever an object is given back to the pool and should usually be fast, this method will be called when objects are idle to make sure they don't "timeout" or become stale in anyway.

    For convenience, this method defaults to call **validate** but you can implement it in a different way if you would like to.

    item

    an object produced by this pool

    returns

    Definition Classes
    MySQLConnectionFactory → ObjectFactory
  21. def toString(): String

    Definition Classes
    AnyRef → Any
  22. def validate(item: MySQLConnection): Try[MySQLConnection]

    Validates that an object can still be used for it's purpose.

    Validates that an object can still be used for it's purpose. This method should test the object to make sure it's still valid for clients to use. If you have a database connection, test if you are still connected, if you're accessing a file system, make sure you can still see and change the file.

    You decide how fast this method should return and what it will test, you should usually do something that's fast enough not to slow down the pool usage, since this call will be made whenever an object returns to the pool.

    If this object is not valid anymore, a scala.util.Failure should be returned, otherwise scala.util.Success should be the result of this call.

    item

    an object produced by this pool

    returns

    Definition Classes
    MySQLConnectionFactory → ObjectFactory
  23. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from ObjectFactory[MySQLConnection]

Inherited from AnyRef

Inherited from Any

Ungrouped