case classMemcached(label: String, keyHasher: KeyHasher = ..., params: Params = Memcached.defaultParams) extends Product with Serializable
Stack based Ketama Memcache builder. It builds a Ketama Memcache
client that dispatches through pipelining on a singleton pool,
and uses KetamaFailureAccrualFactory that fails immediately
when a node is marked dead.
For example, a client can be built through:
val client = Memcached(label).newClient(dest)
Note: newClient takes Name as param, and ONLY Bounded names are supported.
If you want to provide finely tuned configurations:
val client =
Memcached(label)
.configured(FailureAccrualFactory.Param(30, () =>1.seconds))
// tcp connection timeout
.configured(Transporter.ConnectTimeout(100.milliseconds))
// one single request timeout
.configured(TimeoutFilter.Param(requestTimeout))
// the acquisition timeout of a connection
.configured(TimeoutFactory.Param(serviceTimeout))
.configured(EjectFailedHost(false))
.newClient(dest)
Stack based Ketama Memcache builder. It builds a Ketama Memcache client that dispatches through pipelining on a singleton pool, and uses
KetamaFailureAccrualFactory
that fails immediately when a node is marked dead.For example, a client can be built through:
val client = Memcached(label).newClient(dest)
Note: newClient takes
Name
as param, and ONLY Bounded names are supported.If you want to provide finely tuned configurations: