spice.http.client.ConnectionPool.scala Maven / Gradle / Ivy
The newest version!
package spice.http.client
import scala.concurrent.duration._
import reactify._
trait ConnectionPool {
def maxIdleConnections: Int
def keepAlive: FiniteDuration
def idle: Int
def active: Int
def total: Int = idle + active
}
object ConnectionPool {
var maxIdleConnections: Int = 100
var keepAlive: FiniteDuration = 5.minutes
def apply(client: HttpClient,
maxIdleConnections: Int = maxIdleConnections,
keepAlive: FiniteDuration = keepAlive): ConnectionPool = {
client.implementation.connectionPool(maxIdleConnections, keepAlive)
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy